class Entity
{
public:
float X, Y;
Entity(float x, float y)
{
X = x;
Y = y;
}
};
int main()
{
Entity a(2.1,5.4);
std::cout << a.X << "," << a.Y << std::endl;
}
Entity在C++中的应用
最新推荐文章于 2024-09-28 07:34:04 发布
class Entity
{
public:
float X, Y;
Entity(float x, float y)
{
X = x;
Y = y;
}
};
int main()
{
Entity a(2.1,5.4);
std::cout << a.X << "," << a.Y << std::endl;
}