I'm getting these types of errors: identifier "gm" is undefined or expected a ';'
How do I fix these errors?
#include <iostream>
#include <cstdlib> //srand
#include <ctime> //time
#include <cmath>
#include <string>
using namespace std;
int G_master;
int m_secret;
int m_choice;
int m_win, m_prev_delta;
int Number_guess;
int Card_guess;
int delta;
int endchk;
class G_master
public:
int m_secret;
int m_guess;
int m_win;
int m_prev_delta;
void setup();
void hello() { cout << "Hello\n"; }
void listen();
void respond();
void menu();
int endchk();
void prompt();
void cleanup();
void conversation();
};
int main()
{
G_master gm;
gm.conversation();
return 0;
}
void G_master::conversation()
{
setup();
hello();
do{
listen();
respond();
} while (endchk());
cleanup();
}
void G_master::respond()
{
switch (m_choice)
{
case 1:
{ Number_guess ng;
ng.conversation();
break;
}
case 2:
{ Card_guess cg;
cg.conversation();
break;
}
default:
}
}
void G_master::menu()
{
string menu = 0;
cout << menu;
}
void G_master::listen()
{
menu();
cin >> m_choice;
}