During compiling, I got the following error report:
Code: Select all
mrEntity.cpp: In constructor `mrEntity::mrEntity()':
mrEntity.cpp:17: error: no match for 'operator=' in '
this->mrEntity::m_kCenterOfMass = mrVector2D(0.0, 0.0)'
mrVector2D.h:27: error: candidates are: mrVector2D&
mrVector2D::operator=(mrVector2D&)
Code: Select all
class mrEntity
{
protected:
/* Physical attributes */
mrVector2D m_kCenterOfMass;
}
mrEntity::mrEntity (void)
{
m_kCenterOfMass = mrVector2D (0, 0); /*---THIS IS WHERE THE ERROR OCCURS---*/
}
Code: Select all
mrVector2D & operator = (mrVector2D & rkVector);