home *** CD-ROM | disk | FTP | other *** search
/ NetNews Usenet Archive 1992 #20 / NN_1992_20.iso / spool / comp / lang / cplus / 13383 < prev    next >
Encoding:
Text File  |  1992-09-08  |  929 b   |  26 lines

  1. Newsgroups: comp.lang.c++
  2. Path: sparky!uunet!digex.com!car
  3. From: car@access.digex.com (Mr. Blue)
  4. Subject: Reference as a return type
  5. Message-ID: <1992Sep7.185350.3349@access.digex.com>
  6. Organization: Express Access Online Communications, Greenbelt, MD USA
  7. Date: Mon, 7 Sep 1992 18:53:50 GMT
  8. Lines: 16
  9.  
  10.  
  11. I'm probably asking a question that belongs in FAQ, (and if there
  12. is such a list of question for this newsgroup I'd be grateful if someone
  13. emailed it to me)
  14.  
  15. Anyway my question is this: Whats the difference between returning a
  16. pointer to a class and a reference to a class from a member function??
  17. I mean a reference is just a pointer, isn't it? However I get the feeling
  18. that the semantics are very different, i.e. copy constructors are called,
  19. etc. Can someone tell me what happens on the run time stack to contrast
  20. the 2 cases? I know this is probably a naieve question,but I'm still
  21. learning so forgive me.
  22.  
  23. Thanks,
  24. Chris
  25.  
  26.