Beispiel DCastExp
Ausgabe des Beispielprogramms:
333 1 A 3.3 333 1 A 3.3 333 1 A 3.3 333 1 A 3.3 333 1 A 3.3 333 1 A 3.3 &c = 0xbffffa9c pA = 0xbffffa9c pB = 0xbffffaa8 pS = 0xbffffab8 pC = 0xbffffa9c pQ = 0xbffffaa8 Differenz (dec) = 12 sizeof(c) = 36 Downcast-Error: But O.K. The real type of (*pA) is TD.1A Exception handled: bad_cast