Information AboutTypeid |
| CATEGORIES ABOUT TYPEID | |
| c | |
|
EXAMPLES Supposing that you had class "Message" a derived class "FatMessage":... class Message { string n; }; class FatMessage : public Message { string p; }; ..., and the following code:
cout << typeid(p) << endl; cout << wakka << endl; Then, typeid would return the following results in code compiled with RTTI: FatMessage Message Message Important: Note that you had to dereference the pointer in the first printf. |
|
|