#include<iostream>
#include<typeinfo>
using namespace std;
int main(){
class c1{
public:
int a ;
};
c1 obj1;
cout<<typeid(obj1).name();
}
I ran it on ideone and the typeid.name()
returns Z4mainE2c1
. It becomes apparent that c1
is the name of the class but what is Z4mainE2
.
Why is it not displaying the type name only?