End your programs with a newline to make them portable.
cout << "\n";
-----
Use cerr instead of cout for displaying error messages
-----
Use enum types instead of defining constants (when appropriate). However, do not treat them as integers (i.e. do not use arithmetic operators on them, etc.)
No comments:
Post a Comment