-----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) -=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=- -----BEGIN PGP SIGNATURE----- Version: PGPfreeware 5.0i for non-commercial use MessageID: Mqyve75goky7Nb6fefYC/Sh3qq9PuiJi Comment: iQCVAwUBOH3OA/yJjJy/cQT1AQEzOQQAut8lc3ns0EgZiQc80OgiKjlgnLv9g4Np bOdvfgxqspDkUqV6j/D/w0I1tJc3QAwLh8EsF4t6K27dd3yqJN2JVEnvud/7wNGh as2+1S1gqhV6k6dttkY5rfPy+epp/e8ZM5jmhFiS0H/HG+F6Vq+wTAm1f3DnWpoX a1mRhzHjZ+g= =fR1c -----END PGP SIGNATURE-----