E
ezelasky
I am programming in microsoft VC++ 7.1 and get an unhandled exception
when I use typeid on a deferenced pointer.
So I tried the example below, from the msdn site and I am seeing the
same error as with my code, "Unhandled exception ...
__non_rtti_object__".
Perhaps I am missing a setting or something in my environment?
Thanks, Elizabeth
class Base {
public:
virtual void vvfunc() {}
};
class Derived1 : public Base {};
Derived1* pd = new Derived1;
Base* pb = pd;
cout << typeid( *pb ).name() << endl;
delete pd;
[ See http://www.gotw.ca/resources/clcm.htm for info about ]
[ comp.lang.c++.moderated. First time posters: Do this! ]
when I use typeid on a deferenced pointer.
So I tried the example below, from the msdn site and I am seeing the
same error as with my code, "Unhandled exception ...
__non_rtti_object__".
Perhaps I am missing a setting or something in my environment?
Thanks, Elizabeth
class Base {
public:
virtual void vvfunc() {}
};
class Derived1 : public Base {};
Derived1* pd = new Derived1;
Base* pb = pd;
cout << typeid( *pb ).name() << endl;
delete pd;
[ See http://www.gotw.ca/resources/clcm.htm for info about ]
[ comp.lang.c++.moderated. First time posters: Do this! ]