//RTTI.cpp //Dana Steil //1-31-2003 #include #include using namespace std; class CDog { public: int x; private: int y; }; void main() { cout << (typeid(cin)).name() << endl; cout << (typeid(cout)).name() << endl; CDog Dog; cout << (typeid(Dog)).name() << endl; cout << (typeid(Dog)).raw_name() << endl; if (typeid(Dog) == typeid(cout)) { cout << "Dog and cout are of the same Datatype" << endl; } if (typeid(Dog) != typeid(cout)) { cout << "Dog and cout are not of the same Datatype" << endl; } }