diff options
Diffstat (limited to 'console.cpp')
-rw-r--r-- | console.cpp | 16 |
1 files changed, 16 insertions, 0 deletions
diff --git a/console.cpp b/console.cpp index 6a2555b..c6b7d4d 100644 --- a/console.cpp +++ b/console.cpp @@ -26,6 +26,7 @@ #include <stdio.h> #include <string.h> #include <stdarg.h> +#include <cstdlib> #ifdef _WIN32 #include <windows.h> @@ -211,3 +212,18 @@ void printer::print_str(const char* str) fflush(logfile); } } + +//Do a press any key for the windows folk. *insert any key joke here* +#ifdef _WIN32 +void win_exit() +{ + printer::inst()->print_str("Press any key to exit."); + get_key(); + std::exit(1); +} + +#else +void win_exit() { + std::exit(1); +} +#endif // _WIN32 |