Last active
December 6, 2017 04:55
-
-
Save johnhmj/e994d4ae7e30277cfe2e076537db7f8d to your computer and use it in GitHub Desktop.
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
#include <Windows.h> | |
// | |
// 1st way to avoid max conflict: undefine max from Windows.h | |
#ifdef max | |
#undef max | |
#endif | |
// | |
int wmain(int argc, wchar_t* argv[]) | |
{ | |
// | |
// PAUSE | |
cin.clear(); | |
// 2nd way to avoid max conflict: undefine max from Windows.h | |
cin.ignore((std::numeric_limits<std::streamsize>::max)(), '\n'); | |
cout << "press any key to continue..."; | |
cin.get(); | |
return 0; | |
} |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment