Why have you included Windows?
This is a pointless method:
1 2 3 4
|
int exit()
{
return 1;
}
| |
|
cf2( ); // Should return an int. Make it void if it doesn't return anything. |
f2c( ); // Should return an int. Make it void if it doesn't return anything. |
again( ); // Should return an int. Make it void if it doesn't return anything. |
Why not integrate a loop instead of calling
again( ) over and over?
Eventually, your code will return to
main after the branching methods of
tempmenue( ) return. Overall, no value is returned from
tempmenue( ) because it's void.
1 2 3 4
|
else if (choice == 3)
{
main(); // This call will mean that int main will be calling itself.
}
| |
|
P.S: Your header is fine. Although, it's common to see methods and classes declared in a header and defined in a source file.
aio_choices should be initialized before you use it, avoid
using namespace std whenever possible; it causes namespace pollution.
No harshness intended.
Edit ---------------------------------8<-------------------------------------
I see methods that return values but the returning values are not processed whatsoever. Like I said, make methods
void if they either return nothing or the return value is going to be ignored.
Instead of using multiple
if conditions, use a
switch condition( Cleaner by far ).