4 ms·
... and a few more: You can convert enum->int, but you can't go the other way. All text input files must have eoln() defined at all times, so if an when you m
by drfuchs 6y ago
... and a few more:
You can convert enum->int, but you can't go the other way.
All text input files must have eoln() defined at all times, so if an when you manage to open stdin, the program must halt until the user types a line of input (and eoln() will be true iff it's empty). Then when your program reads the line and the \n, everything halts until the user types the next line of input. It's virtually impossible to make a program that interacts with the user.
And if I had a nickel for every time a student got stymied by the fact that the syntax insists you must not have a semi-colon in front of an "else"....