This one is about object oriented programming. In java I could just add new files and have them be classes so if I wanted a Player class in java I would make a file that said:
And in my driver I could say, Player p = new Player(1,2); or something.Code:public class Player { public Player(int a, int b) {some stuff} --- some more methods }
In C++ I'm not really sure what to do...here's what I have so far and its giving me an error about /clr options or something:
Code:#include <iostream> #include <string> using namespace std; public class Player { public: double points,value; string name, pos; Player (string,string,double); }; Player::Player (string n, string p, double pts) { name = n; pos = p; points = pts; }