Skip to content

Instantly share code, notes, and snippets.

View RicardoEPRodrigues's full-sized avatar

Ricardo Rodrigues RicardoEPRodrigues

View GitHub Profile
/* So how does this work?
I'm using ANSI escape sequences to control the behavior of the terminal while
cat is outputting the text. I deliberately place these control sequences inside
comments so the C++ compiler doesn't try to treat them as code.*/
//
/*The commands in the fake code comment move the cursor to the left edge and
clear out the line, allowing the fake code to take the place of the real code.
And this explanation uses similar commands to wipe itself out too. */
//
#include <cstdio>