home *** CD-ROM | disk | FTP | other *** search
/ NetNews Usenet Archive 1992 #18 / NN_1992_18.iso / spool / comp / lang / cplus / 12438 < prev    next >
Encoding:
Internet Message Format  |  1992-08-17  |  1.1 KB

  1. 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
  2. From: baldwin@cps.msu.edu (Reid A Baldwin)
  3. Newsgroups: comp.lang.c++
  4. Subject: Virtual Functions and Shared Memory
  5. Message-ID: <1992Aug17.182423.14341@msuinfo.cl.msu.edu>
  6. Date: 17 Aug 92 18:24:23 GMT
  7. References: <1992Aug17.145104.5729@edrc.ac.uk>
  8. Sender: baldwin@pacific.cps.msu.edu (Reid A Baldwin)
  9. Organization: Dept. of Computer Science, Michigan State University
  10. Lines: 13
  11.  
  12. I am developing an application in which multiple processes communicate
  13. via shared memory (UNIX). Unfortunately, virtual functions don't work for
  14. objects in shared memory. The process that creates an object gets the
  15. correct results, but other processes execute the function for the
  16. base class instead of the derived class (using the pointer type instead
  17. of the object type). I am not familiar with the implementation of virtual
  18. functions. Is it possible to use virtual functions on objects that are
  19. created by other processes and accessed via shared memory?
  20.  
  21. Thanks for your help,
  22. Reid Baldwin
  23.  
  24. P.S. I will post a summary of responses if they are interesting.
  25.