ok so heres my script
#include <iostream>
using namespace std;
using namespace std;
int Unitedstates()
{
int action;
char action1;
cout << "you have chosen to learn more about the united states. Now What will you do?" << endl;
cout << "1. The quality of doctors in the United States." << endl;
cout << "2. What happens when a doctor commites malpractice." << endl;
cout << "3. Average salery of doctors." << endl;
cout << "4. Practices in the United States." << endl;
cin >> action;
if (action == 1){
cout << "Coming soon" << endl;
}
else if (action == 2){
cout << "coming soon" << endl;
}
else if (action == 3){
cout << "the average salery is $100,000 a year." << endl;
}
else if (action == 4){
cout << "coming soon" << endl;
}
else {cin >> action;}
}
int Europe(){
int action;
char action1;
cout << "You have chosen to learn more about Medecine in Europe." << endl;
cout << "Now what do you want to learn about?" << endl;
cout << "1. The quality of doctors in Europe." << endl;
cout << "2. What happens when a doctor commites malpractice." << endl;
cout << "3. Average salery of doctors." << endl;
cout << "4. Practices in the United States." << endl;
cin >> action;
if (action== 1){
cout << "coming soon" << endl;
cout << "to go back to the main menu, press 1, and then enter." << endl;
cin >> action;
if (action == 1)
cout << Mainmenu();
else cin >> action;
}
else if (action == 2){
cout << "coming soon" << endl;
cout << "to go back to the main menu, press 1, and then enter." << endl;
cin >> action;
if (action == 1)
cout << Mainmenu();
else cin >> action;
}
else if (action == 3){
cout << "coming soon" << endl;
cout << "to go back to the main menu, press 1, and then enter." << endl;
cin >> action;
if (action == 1)
cout << Mainmenu();
else cin >> action;
}
else if (action == 4){
cout << "coming soon" << endl;
cout << "to go back to the main menu, press 1, and then enter." << endl;
cin >> action;
if (action == 1)
cout << Mainmenu();
else cin >> action;
}
else cin >> action;
}
int Mainmenu(){
int action;
char action1;
cout << "Welcome to my Quarter Project." << endl;
cout << "What would you like to learn more about?" << endl;
cout << "1. Medecine in the United States." << endl;
cout << "2. Medecine in Europe." << endl;
cout << "3. Medecine in China." << endl;
cout << "4. Medecine in Australia." << endl;
cout << "5. Medecine in Africa." << endl;
cout << "6. Medecine in Brazil." << endl;
cin >> action;
if (action == 1)cout << Unitedstates();
else if (action == 2) cout << Europe();
else {cin >> action;}
}
int main()
{
int action;
char action1;
cout << Mainmenu();
system("pause");
return 0;
}
i dont get how i would fix this...
these are the errors
function `int Europe()':
54 `Mainmenu' undeclared (first use this function)
(Each undeclared identifier is reported only once for each function it appears in.)
In function `int Mainmenu()':
76 `int Mainmenu()' used prior to declaration