Skip to content

Instantly share code, notes, and snippets.

@onqtam
Last active August 29, 2015 14:05
Show Gist options
  • Save onqtam/713e2fb2db1b5472ae35 to your computer and use it in GitHub Desktop.
Save onqtam/713e2fb2db1b5472ae35 to your computer and use it in GitHub Desktop.
#include <cstdio>
int main() {
bool b = false;
*((char*)&b) = 2;
if(b == true) printf("b is true!\n");
if(b == false) printf("b is NOT true!\n");
return 0;
}
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment