所以我的目标很简单 我想在基类中有一个x和y 然后让我的其他班级也拥有这些价值观
class Skeleton
{
private:
float x, y;
public:
Skeleton(float x, float y);
};
class Object : Skeleton
{
float getX() const
{
return x;
}
};
顺便说一下,我是C ++的新手 我来自Java,想学习C ++!
所以我的目标很简单 我想在基类中有一个x和y 然后让我的其他班级也拥有这些价值观
class Skeleton
{
private:
float x, y;
public:
Skeleton(float x, float y);
};
class Object : Skeleton
{
float getX() const
{
return x;
}
};
顺便说一下,我是C ++的新手 我来自Java,想学习C ++!