Created
June 6, 2017 10:56
-
-
Save PaulChana/535b44da30b8f491a827d772ee86ab7d to your computer and use it in GitHub Desktop.
Show / Hide the cursor on a console
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
void setConsoleCursorVisibility (const bool visible) | |
{ | |
if (! visible) | |
std::cout << "\033[?25l" << std::flush; | |
else | |
std::cout << "\033[?25h" << std::flush; | |
} |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment