Hey ! i dont want to be a jerk by making my first post a question and not a reply buuut...
So i am trying to get back into programming as a hobby i havent done it since highschool ! i used a little c# in grade 12 but dont remember much. Anyway im trying to learn c++ now and am a little stuck, probly a simple fix but here it is.
i am just mucking around and trying to make a simple program to just ask if you want to use my simple calculator "calc extreme" or if you want to retrun to the start of the program etc.. anyway when i compile it i get a error in this part of the code..it says main is not declaired in this scope, whgat i dont get is that i call the old member and membername and dotn get that error but when i want the program to return to the main func it gives a error ? i tried to move the main funct around and it didnt seem to help. any one who can shine some light on a newbie i would be so grateful!
Code:
string oldmember()
{
int selection;
cout<<"Welcome back to the club!\n";
cout<<"What can we do for you today?\n";
cout<<"1-Calculator extreme\n 2-main menu: ";
cin>>selection;
if (selection==1)
calculator();
else if(selection==2)
main();
//else
//cout<<"please try again";
//goto c;
}
int main()
{
char member;
c:
cout<<"Welcome to the club\n";
cout<<"Are you a new member? (Y/N)";
cin>>member;
if ((member=='Y') || (member=='y'))
membername();
else if ((member=='N') || (member=='n'))
oldmember();
else
cout<<"Please try again\n";
goto c;
}