1.-Can you explain the entire exercise?
2.-I am seeing something scary, you are calling main -recursively i guess-
"return main();"
3.-Are there some important -heavy- reason to do it in this way?
4.-Can you call itself main function in your compiler?
2.I'm using main() because we haven't gotten to functions (modules) yet, and I don't want to screw up my syntax even further.
Unfortunately calling main() as if it was a normal function is not valid code. It is only possible to attempt this by using a quirk of the compiler since it is not permitted by the C++ standard. If you attempt to compile this code with a different compiler it could simply fail to compile and give an error message.
A valid alternative is to use a loop. For example a while loop, which will repeat while a particular condition is true.
2.I'm using main() because we haven't gotten to functions (modules) yet, and I don't want to screw up my syntax even further.
You can use a while loop,
isn't?
1 2 3 4 5 6 7 8
//pseudocode style not true c++
while(option isNot exit_key){
//show menu exercises 1-add 2-subtract 3.-....5-exit_key
//if(1 or 2 or 3 or 4...)
//execute choose with clever modules -add,subtract,etc-
}//end while loop
Wow! thanks man,seeing code is the best way to learn so I understand the actual mechanics. I got it solved with way less advanced (incorrect) methods.
I was messing around with the while loop but I need to read the functions chapter more in depth. I got half way and then ran into syntax errors lol. This will definitely help.
Now there is one assignment where I cant figure out how to use the user input to limit the range of the oct, hex and binary numbers it's supposed to put out.
Heck I can't even get the binary to print lol
You've helped more than enough though, THANKS AGAIN!