-
problem with switches and loops
i cant figure out why this prog crashes
it doesnt exit or anything, but it just keeps repeating the information its supposed to say
-
Please Note:
the program is being run under Windows at a DOS command prompt
-
In C, your program can not be allowed to make
recursive call with main() function.
Only OS is allowed to call your program's main()
function. So remove the call main() in default
of switch statement.
Good luck
DV007
-
Me want cookie!
1. It's not compiling on my system (need to include process.h).
2. Use int main(void) and return something!
3. Don't call main in main. This is wrong!
4. Don't use while(1), use while(c != 'x' && c != 'X')
-
Me want cookie!
Originally posted by Monster
use while(c != 'x' && c != 'X')
This must be: while((char)c != 'x' && (char)c != 'X')
Cheers, Monster
Popular pages
Recent additions