学习c++的类中遇到的一个问题
class Position {
public: int x; int y;
};
class Robot {
public:
Robot(); /* default constructor, initialize at (0,0) */
Robot(Position pos); /* initialize at pos */
void Move(char Dir); /* Dir could be 'N', 'E', 'S', 'W', for other characters, the robot don’t move */
Position GetPosition(); /* return current position */
private:
Position currentPos;
};
Robot::Robot(Position pos); /* initialize at pos */这个一直报错请问是什么问题