Hey, I'm trying to do a class for a games program, basically it will allow me to enter games into the class. Here is the code
(It won't work)
#include <iostream>
#include <windows.h>
using namespace std;
class Games {
private:
char game_title;
char game_cost;
char name;
public:
void set_values(char name, char desc);
char getName();
};
void Games::set_values(char name, char desc)
{
game_title = name;
game_cost = desc;
}
char Games::getName()
{
return name;
}
int main()
{
Games g1;
g1.set.values("Game");
cout << g1.getName();
Sleep(30000);
return 0;
}
Thanks for any help =)