devilishruby
جمعه 25 بهمن 1387, 23:15 عصر
مشکلم توی کد زیر کجاست که با ارور زیر برخورد می کنم؟
namespace VL{
class Sift
{
struct Keypoint
{
int o ; ///< Keypoint octave index
int ix ; ///< Keypoint integer X coordinate (unnormalized)
int iy ; ///< Keypoint integer Y coordinate (unnormalized)
int is ; ///< Keypoint integer scale indiex
float_t x ; ///< Keypoint fractional X coordinate
float_t y ; ///< Keypoint fractional Y coordinate
float_t s ; ///< Keypoint fractional scale index
float_t sigma ; ///< Keypoint scale
} ;
typedef std::vector<Keypoint> Keypoints ; ///< Keypoint list datatype
typedef Keypoints::iterator KeypointsIter ; ///< Keypoint list iter datatype
typedef Keypoints::const_iterator KeypointsConstIter ; ///< Keypoint list const iter datatype
.
.
}
.
.
.
}//namespace VL
myFunction()
{
VL::Sift::KeypointsIter VectKeypointsIter;
Keypoints keypoints ;
VectKeypointsIter=keypoints.begin();
}
error C2440: '=' : cannot convert from 'struct std::pair<struct VL::Sift::Keypoint,float> *' to 'struct VL::Sift::Keypoint *'
Types pointed to are unrelated; conversion requires reinterpret_cast, C-style cast or function-style cast
namespace VL{
class Sift
{
struct Keypoint
{
int o ; ///< Keypoint octave index
int ix ; ///< Keypoint integer X coordinate (unnormalized)
int iy ; ///< Keypoint integer Y coordinate (unnormalized)
int is ; ///< Keypoint integer scale indiex
float_t x ; ///< Keypoint fractional X coordinate
float_t y ; ///< Keypoint fractional Y coordinate
float_t s ; ///< Keypoint fractional scale index
float_t sigma ; ///< Keypoint scale
} ;
typedef std::vector<Keypoint> Keypoints ; ///< Keypoint list datatype
typedef Keypoints::iterator KeypointsIter ; ///< Keypoint list iter datatype
typedef Keypoints::const_iterator KeypointsConstIter ; ///< Keypoint list const iter datatype
.
.
}
.
.
.
}//namespace VL
myFunction()
{
VL::Sift::KeypointsIter VectKeypointsIter;
Keypoints keypoints ;
VectKeypointsIter=keypoints.begin();
}
error C2440: '=' : cannot convert from 'struct std::pair<struct VL::Sift::Keypoint,float> *' to 'struct VL::Sift::Keypoint *'
Types pointed to are unrelated; conversion requires reinterpret_cast, C-style cast or function-style cast