home *** CD-ROM | disk | FTP | other *** search
- Path: sparky!uunet!igor!thor!rmartin
- From: rmartin@thor.Rational.COM (Bob Martin)
- Newsgroups: comp.lang.c++
- Subject: Re: Novice question
- Message-ID: <rmartin.715993652@thor>
- Date: 8 Sep 92 23:07:32 GMT
- References: <H7ZyoB6w164w@cellar.org> <1992Sep3.164747.25939@news.miami.edu> <1992Sep4.194039.23622@advtech.uswest.com> <1992Sep5.000938.9187@lut.ac.uk>
- Sender: news@Rational.COM
- Lines: 31
-
- J.March@lut.ac.uk writes:
-
- |Why dosn't this work?...
-
- |class thing
- |{
- | ...
- | void f();
- | void g();
- |}
-
- |void main()
- |{
- | thing obj;
-
- | obj.f().g();
- |}
-
-
- This can be rewritten as ( obj.f() ).g();
-
- The return value of (obj.f()) is void. So you are trying to invoke the g() member function of a 'void'. This is a non-sequitur.
-
-
-
-
- --
- Robert Martin Training courses offered in:
- R. C. M. Consulting Object Oriented Analysis
- 2080 Cranbrook Rd. Object Oriented Design
- Green Oaks, Il 60048 (708) 918-1004 C++
-