Mega Code Archive

 
Categories / C++ Tutorial / Development
 

Using typeid

#include <iostream> #include <ostream> #include <typeinfo> enum color   { red, black }; int main() {   std::cout << typeid(red).name() << '\n';   std::cout << typeid(color).name() << '\n'; } 5color 5color