error in code...

kindly point out my error...when I compile it gives STATMENT MISSING; error at line 43
#include<graphics.h>
#include<iostream.h>
#include<conio.h>
#include<stdlib.h>
#include<stdio.h>
#include<string.h>
void main(void)
{
int gdriver=DETECT,gmode;
initgraph(&gdriver,&gmode,"C:\\turboc3\\bgi");
ellipse(320,95,360,0,25,20);
line(298,85,341,85);
circle(310,90,2);
circle(330,90,2);
arc(320,100,200,-20,10);
line(313,115,313,125);
line(328,115,328,125);
arc(320,225,72,107,100);
line(290,129,290,200);
line(350,129,350,200);
line(290,193,350,193);
line(290,200,350,200);
line(290,200,285,280);
line(320,225,305,280);
line(322,225,335,280);
line(350,200,355,280);
line(350,129,385,165);
line(385,165,350,200);
line(350,149,365,165);
line(365,165,350,182);
line(290,129,255,165);
line(255,165,290,200);
line(290,149,275,165);
line(275,165,290,182);
line(285,280,275,287);
line(275,287,305,287);
line(305,280,305,287);
line(335,280,335,287);
line(335,287,365,287);
line(355,280,365,287);
cout<<"ESCAPE ISLAND"<<endl;
main()
{
int wrong;
string THE_WORD,soFar,bool,used;
bool match(char letter,string word);
char askguess(string usedletterstr);
bool play again();
main()
{
srand(time(0));
vector<string> words;
words.push_back("encyclopedia");
words.push_back ("constitution");
words.push_back("government");
word.push_back("kidding");
words.push_back("standard");
words.push_back("firewall");
words.push_back("terror");
words.push_back("profession");
words.push_back("donation");
words.push_back("xerox");
words.push_back("victory");
words.push_back("dentistry");
words.push_back("zodiac signs");
cout<<"Welcome to Hangman-Good luck!\n";
bool done=false;
do
{
const int MAX_WRONG=8;
random_shuffle (words.begin(),words.end());
THE_WORD=word[0];
soFar= (THE_WORD.size(),'-');
used="";
while((wrong<MAX_WRONG)&&(soFar!=THE_WORD))
{
cout<<"\n\n you have "<<MAX_WRONGS-wrong <<"incorrect guesses left\n";
cout<<"\n you have used the following letters :\n"<<used<<endl;
cout<<"\n soFar,the word is:\n"<<soFar<<endl;
used+=ask guess(used);
while(wrong<MAX_WRONGS&& soFar!= THE-WORD)
if(wrong==MAX_WRONG)
{
cout<<"you have been hanged!"<<endl;
}
cout<<"\n the word was "<<THE_WORD<<endl;
}
while(play again());
return0;
}
inline boolmatch(char letter, string word);
{
return(word.find(letter)!=string ::npos);
}
char askguess(string usedletterstr);
{
char guess;
cout<<"\n\n enter guess:";
cin>>guess;
guess=toupper(guess);
while(match(guess.used))
{
cout<<"\n you have already guessed"<<guess<<endl;
cout<<"enter your guess:";
cin>>guess;
guess=toupper(guess);
}
if(match(guess.THE_WORD))
{
cout<<"that's right!"<<guess<<"is in the word \n";
for(int i=0;i<THE WORD.lenght();i++)
if(THE_WORD[i]==guess)
soFar[i]=guess;
}
else
{
cout<<"sorry,"<<guess<<"is not in the word\n";
++wrong;
}
}
bool play again();
{
char again;
cout<<"\n would u like to play again<y/n>:";
cin>>again;
cin.clear();
cin.ignore();
again=toupper(again);
system (cls);
return (again=='Y');
}
getch();
closegraph();
}
}
}
}
Topic archived. No new replies allowed.