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