| TIP: Click on subject to list as thread! | ANSI |
| echo: | |
|---|---|
| to: | |
| from: | |
| date: | |
| subject: | virtual functions |
Well, first of all, in order for a virtual function to "function" (ha)
correctly, both the base class and the derived class must have it
defined as a virtual function......
class a
{
virtual assign(int x);
};
class b : public a
{
virtual assign(int x);
};
the above will "work".....although I have found some problems with
borlands implementation of C++......but they won't effect most people...
Assuming that you meant to say both of those functions were virtual,
then I would begin to suspect a stack / heap problem -- that is (once
again), if you indeed meant to declare both of those as virtual AND it
works in a "small" program and crashes in a larger program.....
'course simple memory corruption would do the same thing too......
SteveH.
--- FidoPCB v1.5 beta-'j'
* Origin: pC-Montana Manhattan MT FidoNet NEC Satellite Link (1:3400/26)SEEN-BY: 12/2442 620/243 624/50 632/348 640/820 690/660 711/409 410 413 430 SEEN-BY: 711/807 808 809 934 942 949 712/353 515 713/888 800/1 @PATH: 3400/26 3615/50 229/2 12/2442 711/409 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™.