so cplusplus.com is losing my connection and won't email back yada yada, so untill thats resolved I'm transferring my learning to this site, now for the program.
any way its just a simple "choose the math operation program" then it performs that operation, but I wanted to add a part after returning the answer, and go back to main() but it wont compile and I'm not sure what the error ' means... so here it is, ask if you need to see more
int addition()
{
double a1;
double a2;
string s2;
system("CLS");
cout << "This will add two numbers\n";
cout << "Please enter the first number:";
cin >> a1;
cout << "Please enter the second numeber:";
cin >> a2;
double adding= (a1 + a2);
cout << "The sum is ";
cout << adding;
cout << endl;
system("CLS");
cout << "Would you like to perform another operation?\n";
cout << "Press y or n";
cin >> s2;
if((s2=="Y") || (s2=="y"))
{
return main();
}
else
{
return 0;
}
}
also its nothing above the return main() line, I can put other things in there like
cout << "something";
or really anything but its the
return main();
that gives the error