Skip to content

Instantly share code, notes, and snippets.

What would you like to do?
/* 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>
int main() {
printf("Fooled you!\n");// printf("Hello, World!\n");
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment