Skip to content

Instantly share code, notes, and snippets.

@mwbrooks
Created March 29, 2010 21:19
Show Gist options
  • Star 0 You must be signed in to star a gist
  • Fork 0 You must be signed in to fork a gist
  • Save mwbrooks/348420 to your computer and use it in GitHub Desktop.
Save mwbrooks/348420 to your computer and use it in GitHub Desktop.
#include <typeinfo>
using namespace std;
int myNumber = 5;
const char *name1 = typeid(int).name(); // i on gcc, int on VSC++
const char *name2 = typeid(myNumber).name(); // i on gcc, int on VSC++
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment