I spent about and hour reading past topics in the forum, and yes I know this is a sore point. So as a beginner, I would like to get it right from the start. I understand the dangers of using System() calls, so I'm trying to write an alternative to sysytem("pause"). This is the code I've written so far, but how compatible is it with other compilers or systems?
I have been told so many times that kbhit() is "not standard C++" but I'm not sure what that matters as far as compatibility with most used architectures (linux,win,mac). The only thing I'd suggest is you call getch() before breaking out to clear the key that was hit out of the buffer.