i have doubts regarding the use of classes.please explain to me with an example.
i have doubts regarding the use of classes.please explain to me with an example.
Code:class POSITION { public: POSITION(); POSITION(int X, int Y); int GetX(); int GetY(); void SetX(int X); void SetY(int Y); void SetPosition(int X, int Y); private: int Xpos; int Ypos; }; int main() { POSITION PlayerPosition(120, 450); POSITION EnemyPosition(200, 180); ... return 0; }
MagosX.com
Give a man a fish and you feed him for a day.
Teach a man to fish and you feed him for a lifetime.