#include <iostream.h>
#include <string.h>
#include <conio.h>
#include <stdio.h>
#include <math.h>
#include <dos.h>
void mm();
void help();
char nme(char [25], char[25]);
void mm()
{ clrscr();
cout<<"||\t\t WELCOME TO THE GAME OF TIC-TAC-TOE \t\t||";
cout<<"\n\t|| RULES ||";
cout<<"\n 1) 2 players are needed to play this game \n 2) select the symbol \n 3) A player wins by being the first\n to connect a line of friendly pieces from one side or\n corner of the play area to the other \n 4) player 1 moves first in first game \n but not in second game if he looses in I game";
}
void help()
{ clrscr();
int cho2;
cout<<"||\t\t GUIDE \t\t||";
cout<<"\n\t * * * \t 1 2 3 \n\t * * * \t 4 5 6 \n\t * * * \t 7 8 9 \n ";
cout<<"\n\n Suppose this is your play area, \n you have to just enter a number between 1-9 during your turn\n and then the star corrosponded to that number\n will be replaced by the char you choose. \n A player wins by being the first\n to connect a line of friendly pieces from one side or\n corner of the play area to the other \n A piece should only be placed on any empty space(*). ";
cout<<"\n The game ends when either one player wins\n or it is no longer possible for a player to win\n (in which case the result is a draw).";
cout<<"\n\n to play enter";
getch();
}
void main()
{
clrscr();
int num,t1,t2,mp;
char p1[25],p2[25],cho;
mm();
cout<<"\n\n\n\n DO YOU WANT TO KNOW HOW TO PLAY this game, \n Y=YES & N=NO(directly start playing game)\n ";
cin>>cho;
if(cho=='y'||cho=='Y')
{ help();
}
if(cho=='n'||cho=='N')
{ clrscr();
nme(char p1); // error is here
}
getch();
}
i'm trying to make a tic-tac-toe c++ program but when i want to call char function it is showing error. please help me i'm a noob
i appreciate your help but can you tell exactly what to do. and i have also tried char nme(char [25]
and nme(p1);
and nme(p1,p2)
please help me.
thanks in advance.