home *** CD-ROM | disk | FTP | other *** search
- Path: sparky!uunet!ogicse!uwm.edu!cs.utexas.edu!zaphod.mps.ohio-state.edu!cis.ohio-state.edu!clipper.cis.ohio-state.edu!beery
- From: beery@clipper.cis.ohio-state.edu (brian david beery)
- Newsgroups: comp.lang.c++
- Subject: Simple question: class objects & pointers
- Message-ID: <1992Nov16.162130.11475@cis.ohio-state.edu>
- Date: 16 Nov 92 16:21:30 GMT
- Article-I.D.: cis.1992Nov16.162130.11475
- Sender: news@cis.ohio-state.edu (NETnews )
- Organization: The Ohio State University Dept. of Computer and Info. Science
- Lines: 19
-
- I am new to C++, and have a question regarding pointers and class objects:
- The following code:
- class cl_object
- {public:
- int value;
- }
- generic_function(cl_object *o)
- {
- *o.value=0;
- };
-
- causes an error message, to the effect that the right side of the '.' must
- be a structure. (I am using Borland C++, if that matters.) How do I access
- member data of an object referenced by a pointer?
-
- Thanks in advance,
- Brian D. Beery
- Ohio State University
-
-