-----BEGIN PGP SIGNED MESSAGE-----
Hello,
I hope someone can tell me why the following source produces an error (trapno 14, error 5):
------------------------------------ class BaseClass { public: virtual void print() { printf("BaseClass::print()\n"); }; };
class DerivedClass : public BaseClass { public: virtual void print() { printf("DerivedClass::print()\n"); }; };
DerivedClass dc;
void main(void) { BaseClass *bc = &dc;
bc->print(); } ----------------------
If dc is defined inside main(), everything works fine.
Chris -- -=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=- Christian Stueble............stueble@ls6.cs.uni-dortmund.de PubKey[BF7104F5].......fp=8678C5D3CAD9CD8C F1DDB8EC202F116A
To be or not to be is true... (apocrypha of George Boole) -=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-