0

Hi
I have a problem with my c++ code which is compiled using turbo c++ on vista

and the code is:

outtextxy(99,40,"f");
	p=getch();
	if(p==27)
   main();
	else if(p=='f') 

	void fig();

error is: misplaced else in function

i have tried changing to
o

uttextxy(99,40,"f");
	p=getch();
	if(p==27){
   main();}
	else if(p=='f') {

	void fig(); }

and now the error says

cannot call 'main' from within the program in function

please help me out

Edited by Nick Evan: Added code-tags

2
Contributors
1
Reply
2
Views
8 Years
Discussion Span
Last Post by Nick Evan
This topic has been dead for over six months. Start a new discussion instead.
Have something to contribute to this discussion? Please be thoughtful, detailed and courteous, and be sure to adhere to our posting rules.