Created
September 18, 2016 23:30
-
-
Save cjoshmartin/23b463434d587231e9f5911029aa06b6 to your computer and use it in GitHub Desktop.
This file contains hidden or 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
#ifndef WIN32 | |
system("CLS"); //clears screen on windows | |
#else | |
cout << "\x1b[2J\x1b[1;1H" << flush << endl; // ANSI Escape codes. | |
#endif // WIN32 |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
sample code for when you need to clear the terminal window in C