Re: typeid() headaches (library to main executable)

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

 



Hi Andreas,

I think the problem you are running into is because you have...

CBaseTestClass* pClass;

...but you are not setting to the pointer to a valid object.  It's just a random garbage value.

If you change your code to this...

CBaseTestClass* pClass = new CBaseTestClass;

...your code should work.  (It worked for me.  I also removed all your inlines, and made them non-inline in the program.cpp file, and put in virtual destructors for both classes.)

HTH,
--Eljay


[Index of Archives]     [Linux C Programming]     [Linux Kernel]     [eCos]     [Fedora Development]     [Fedora Announce]     [Autoconf]     [The DWARVES Debugging Tools]     [Yosemite Campsites]     [Yosemite News]     [Linux GCC]

  Powered by Linux