Skip to content

Instantly share code, notes, and snippets.

@PaulChana
Created June 6, 2017 10:56
Show Gist options
  • Save PaulChana/535b44da30b8f491a827d772ee86ab7d to your computer and use it in GitHub Desktop.
Save PaulChana/535b44da30b8f491a827d772ee86ab7d to your computer and use it in GitHub Desktop.
Show / Hide the cursor on a console
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