home *** CD-ROM | disk | FTP | other *** search
- Path: wintermute.ecs.fullerton.edu!titan!grosin
- From: grosin@titan (Gil Rosin)
- Newsgroups: comp.lang.c++
- Subject: Re: How do I put DIFFERENT classes in the same linked list?
- Date: 9 Apr 1996 14:18:20 GMT
- Organization: California State University at Fullerton
- Message-ID: <4kdrjc$7cf@wintermute.ecs.fullerton.edu>
- References: <4ka938$bj6@wintermute.ecs.fullerton.edu> <4kb8cg$2mp@cocoa.brown.edu>
- NNTP-Posting-Host: titan.ecs.fullerton.edu
- X-Newsreader: TIN [version 1.2 PL2]
-
- Jeremy Rothman (cs032137@cs.brown.edu) wrote:
- : In article <4ka938$bj6@wintermute.ecs.fullerton.edu>,
- : Gil Rosin <grosin@titan> wrote:
- : >class A
- : > {
- : > public:
- : > A *next;
- : > A *prev;
- : > void Print();
- : > };
-
- : I think that your problem is that you need to make the Print function virtual.
-
- : -- Jeremy Rothman
- : Jeremy_Rothman@brown.edu
-
- Thanks for all the help guys, I just need to get some time to completely
- understand virtual functions, but that did the trick.
-
-
-