| TIP: Click on subject to list as thread! | ANSI |
| echo: | |
|---|---|
| to: | |
| from: | |
| date: | |
| subject: | C++ object conversions |
TO: MICAH YODER 08-10-1994
Micah,
Here is a pice of your code:
MY> BaseClass *test, *temp;
MY> ChildClass *MyVar, *MySecondVar;
MY> MySecondVar = (ChildClass)temp;
In the last line you should have written:
MySecondVar = (ChildClass*)temp;
since you are casting to a pointer not to an instance of the class.
Hope it helped.
ramiro.diaz{at}newage.turbo.net
Buenos Aires, Argentina.
---
þ KWQ/2 1.2e þ Smith & Wesson: the original point-and-click interface
---
* Origin: New Age BBS, 24hs. 797-9713/796-3408/796-2827/795-6419 (4:901/100)SEEN-BY: 12/2442 54/54 620/243 624/50 632/348 640/820 690/660 711/409 410 413 SEEN-BY: 711/430 807 808 809 934 712/353 623 713/888 800/1 @PATH: 901/100 900/136 10/100 102/752 2 209/209 280/1 396/1 @PATH: 3615/50 229/2 12/2442 711/409 54/54 711/808 809 934 |
|
| SOURCE: echomail via fidonet.ozzmosis.com | |
Email questions or comments to sysop@ipingthereforeiam.com
All parts of this website painstakingly hand-crafted in the U.S.A.!
IPTIA BBS/MUD/Terminal/Game Server List, © 2025 IPTIA Consulting™.