frustrated .. need help with my code
Okay, so I'm taking a C++ course in college (it's kinda like an intro course) and i'm doing my final exam (i'm not looking for someone to do my final i just need some help)... we have to come up with a game of some sort with what we have learned in class ... I want to do the game that consists of the dots and people take turns drawing lines from 1 dot to another to form a box and get their initial in it ... i have some of my code worked out ... and i cant seem to figure some stuff out ... i'm getting really frustrated with it, and it's a night class, so i cant just go ask my teacher for help ... right now it's just a 3x3 box until i can get it working properly ... the numbers at the top are for the column numbers .. i also cant figure out the code to get the numbers on the side ... grrr ... i'm so frustrated :( if you dont think i can do this, or it would take A LOT of work, maybe suggest a different game .. i'm frustrated enough that i cant even think of something else to do ... please help
main()
{
char game[3][3]=
{
{'*', '*', '*'},
{'*', '*', '*'},
{'*', '*', '*'},
};
// display the board
int c,m,o,t,v,h;
cout << "Do you want to move vertical(v) or horizontal(h)? ";
cin >> m;
cout << endl << "5 6 7" << endl << endl;
if(m==h)
{
cout << "Enter a number to move from(0-4) ";
cin >> o;
cout << "Enter a number to move to(5-9) Remember only one away ";
cin >> t;
}
if(m==v)
{
cout << "Enter a number to move from(0-9) ";
cin >> o;
cout << "Enter a number to move to(0-9) Remember only one away ";
cin >> t;
}
// Row 1
for(c=0; c<=2; c++)
{
cout << game[0][c] << " ";
}
cout << endl << endl;
// Row 2
for(c=0; c<=2; c++)
{
cout << game[1][c] << " ";
}
cout << endl << endl;
// Row 3
for(c=0; c<=2; c++)
{
cout << game[2][c] << " ";
}
cout << endl << endl;
return(0);
}
