Hi guys, im trying to call a function with in another and for some reason i am getting
In function `int bDisplay()':
`move' undeclared (first use this function)
(Each undeclared identifier is reported only once for each function it appears in.)
In function `int move()':
`int move()' used prior to declaration
but the problem is that i have that function declared =(. What going on? Im making a memory tic tac toe game with AI and im fairly new into coding. So please don't flame my syntax =)
Also if it would be more clear to you guys if i posted everything i have right now please ask. Its not that long right now so it wouldnt take up that much space.
int bDisplay()
{
cout<<"\n\n\n\n\n";
cout<<"\t\t\t\t"<<sOne<<" | "<<sTwo<<" | "<<sThree<<endl;
cout<<"\t\t\t\t----------"<<endl;
cout<<"\t\t\t\t"<<sFour<<" | "<<sFive<<" | "<<sSix<<endl;
cout<<"\t\t\t\t----------"<<endl;
cout<<"\t\t\t\t"<<sSeven<<" | "<<sEight<<" | "<<sNine<<endl;
Sleep(2000);
system("cls");
move();
}
int winCond()
{
if (sOne == 'x' && sTwo == 'x' && sThree == 'x'){win();}
if (sOne == 'x' && sFour == 'x' && sSeven == 'x'){win();}
if (sOne == 'x' && sFive == 'x' && sNine == 'x'){win();}
if (sTwo == 'x' && sFive == 'x' && sEight == 'x'){win();}
if (sThree == 'x' && sFive == 'x' && sSeven == 'x'){win();}
if (sThree == 'x' && sSix == 'x' && sNine == 'x'){win();}
if (sFour == 'x' && sFive == 'x' && sSix == 'x'){win();}
if (sSeven == 'x' && sEight == 'x' && sNine == 'x'){win();}
}
int move()
{
bool repeat;
char choice;
winCond();
do {
repeat = false;
cout<<"Please enter a selection 1-9:";
cin>>choice;
switch (choice)
{
case 1:
etc....