home *** CD-ROM | disk | FTP | other *** search
- Path: sparky!uunet!zaphod.mps.ohio-state.edu!rpi!usc!wupost!darwin.sura.net!jvnc.net!netnews.upenn.edu!msuinfo!pacific.cps.msu.edu!baldwin
- From: baldwin@cps.msu.edu (Reid A Baldwin)
- Newsgroups: comp.lang.c++
- Subject: Virtual Functions and Shared Memory
- Message-ID: <1992Aug17.182423.14341@msuinfo.cl.msu.edu>
- Date: 17 Aug 92 18:24:23 GMT
- References: <1992Aug17.145104.5729@edrc.ac.uk>
- Sender: baldwin@pacific.cps.msu.edu (Reid A Baldwin)
- Organization: Dept. of Computer Science, Michigan State University
- Lines: 13
-
- I am developing an application in which multiple processes communicate
- via shared memory (UNIX). Unfortunately, virtual functions don't work for
- objects in shared memory. The process that creates an object gets the
- correct results, but other processes execute the function for the
- base class instead of the derived class (using the pointer type instead
- of the object type). I am not familiar with the implementation of virtual
- functions. Is it possible to use virtual functions on objects that are
- created by other processes and accessed via shared memory?
-
- Thanks for your help,
- Reid Baldwin
-
- P.S. I will post a summary of responses if they are interesting.
-