Hey,
I am very new to C++ and am tryng to write a program where after a task has been compleated the program links back to the start. The only problem im having is that they are in diffrent funtions.
Here is the code (ts very messy and incomplete but its one of my first tries)
do
{
char choice;
cout << "Enter choice: ";
cin >> choice;
if(choice == '-')
{
second(); //you should give your functions meaninful names,
}
elseif(choice == '/')
{
third(); //for example, PlayGame() and DoGame() are meaningful
}
else
{
cout << "Invalid, "; //next loop writes "Enter choice: " after this
}
}while(choice != 'x' && choice != 'X'); //exit when they type x or X
By the way,
int (main);
This makes an integer named main. It'd be the same even without the ()
int a,c,i,n,b,r ;
Again, give your variables meaningful names! The only time you don't need to is for obvious for-loop variables like i, j, k, etc...
Your indenting on lines 17-49 is really bad, you should fix it up so it is easier to read ;)