What problem with my program?I need your help.

i am a beginner in c++ programming. i try to make a program but i'm stuck..i dont know what what error in my programming (error C2447: missing function header (old-style formal list?)...please help me..this is my coding...


#include <iostream>
#include <string>
#include<cstdlib>

using namespace std;

void Bus_available();
void Reservatiton();
void show();


int main ();


{
int no;


cout<<endl<<endl<<endl;
cout<<"\t*--------------------------------------------------------*"<<endl;
cout<<"\t| **************************************************** |"<<endl;
cout<<"\t| ***** Welcome To Johor Bus transit **** |"<<endl;
cout<<"\t| ***** Choose Your Menu **** |"<<endl;
cout<<"\t| ***** <1> Bus Available **** |"<<endl;
cout<<"\t| ***** <2> Reservation **** |"<<endl;
cout<<"\t| ***** <3> Show **** |"<<endl;
cout<<"\t| ***** <0> Exit **** |"<<endl;
cout<<"\t| **************************************************** |"<<endl;
cout<<"\t*--------------------------------------------------------*"<<endl<<endl;
cout<<"\tYou choose: ";
cin>>no;


if(no==1)
{

Bus_available();

}
else if(no==2)
{
Reservation();
}

else if(no==3)
{

Show();
}
else
{

int back;
cout<<endl<<endl<<endl;
cout<<"\tReady to exit??"<<endl;
cout<<"\t1.Yes"<<endl;
cout<<"\t2.No"<<endl;
cout<<"\tYou choose : ";
cin>>back;
switch(back)
{
case 1:

cout<<endl<<endl<<endl;
cout<<"\tThank you!!"<<endl;
cout<<"\tEnjoy your trip!(^^,)"<<endl<<endl;
getch();
exit(1);
break;
default:

main();
break;
}
}

return 0;

}

i hope somebody help me...
Welcome to the forum.

For the people who read your question to be able to help you as soon as possible:

1- Please use the [code][ /code] wrapper for your code to make it easy to read
2- Use indents in your code.
3- Point out where the compile error happens.
lol, its a simple error.

 
int main ();  // <-- the semicolon isn't suppose to be there, if it is its a prototype. 
hehehe... I can't notice such funny errors with unwrapped code... good for you Azagaros ;)
Also you spelt reservation wrong in your prototype at the top of your you code. Then you spell it differently through out.
Again, you spell show() with a capital 'S' in your prototype then different when you call it.
thanks a lot...you all very helpful...:-)
Topic archived. No new replies allowed.