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

What on earth are you trying to accomplish with this "code"?

Be a part of the DaniWeb community

We're a friendly, industry-focused community of developers, IT pros, digital marketers, and technology enthusiasts meeting, networking, learning, and sharing knowledge.