I\'m writing a function that basically waits for the user to hit \"enter\" and then does something. What I\'ve found that works when testing is the below:
#incl
The '\n' is the "Line Feed" and '\r' is the carriage return. Different operating systems will handle new lines in a different way, such as
Windows
Expects a newline to be combination of two characters, '\r\n'.
Linux\Unix and Modern Mac OS
Uses a single '\n' for a new line.
Classic Mac OS
Uses a single '\r' for a new line.
Basically, I would use if (x == '\n')
as it is currently used by all modern operating systems.