home *** CD-ROM | disk | FTP | other *** search
- Path: sparky!uunet!mcsun!fuug!demos!kiae!glas!demos!ariel.lerc.nasa.gov!smneyln
- From: smneyln@ariel.lerc.nasa.gov
- Newsgroups: comp.lang.c++
- Date: 17 Jul 92 22:00 MDT
- Subject: Is this call necessary?...
- Sender: Notesfile to Usenet Gateway <notes@glas.apc.org>
- Message-ID: <17JUL199213004515@ariel.lerc.nas>
- Nf-ID: #N:17JUL199213004515@ariel.lerc.nas:1576324756:001:881
- Nf-From: ariel.lerc.nasa.gov!smneyln Jul 17 22:00:00 1992
- Lines: 32
-
-
- I have classes defined as such:
- class A {
- ..
- };
-
- class B : public A {
- private:
- a *a;
- ..
- };
-
- Now, at some point in the program, I need to modify some of the values of
- the A member refenenced by B. To do so, I have the following private
- function in B:
-
- A GetAMember() {return *a;};
-
- My question is: If then have: A amember = bmember.GetAMember, can I
- assume that changes made in amember will be also done in a->a? Or do i need
- a put function as void PutAMember(A amember) {a = &amember); ?
-
- Thanks...
-
-
- Mike Neylon aka Masem the Great and Almighty Thermo GOD
- // Only the | Univ. of Toledo - Chemical Engineering - Senior
- \X/ AMIGA! | NASA Lewis Research Center - Summer Intern
- \_____________|_____smneyln@ariel.lerc.nasa.gov________________/
- -+ How do YOU spell 'potato'? How about 'lousy'? +-
- "Me and Spike are big Malcolm 10 supporters."-J.S.,PLCL
-
-