home *** CD-ROM | disk | FTP | other *** search
- Path: sparky!uunet!sun-barr!cs.utexas.edu!unisql!nandraj
- From: nandraj@unisql.UUCP (Nandraj Arni)
- Newsgroups: comp.lang.c++
- Subject: enum problem.
- Message-ID: <3532@unisql.UUCP>
- Date: 26 Aug 92 18:16:57 GMT
- Reply-To: nandraj@unisql.UUCP (Nandraj Arni)
- Organization: UniSQL, Inc., Austin, Texas, USA
- Lines: 48
-
-
- I have this problem. Two versions of GNU's compilers are
- acting in different ways. Which is correct?
-
- Example:
- -------
-
- class EnumTest {
-
- public:
- enum varType { Apple, Orange};
-
- varType get_fn();
-
- }
-
-
- >>>>> The question is how to define get_fn?
-
- One version:
- -----------
-
- varType EnumTest::get_fn()
- {
- ...
- }
-
- Other version:
- -------------
-
- EnumType::varType EnumTest::get_fn()
- {
- ...
- }
-
- Neither compilers like the other definition.
-
- --
- *******************************************************************
- Nandraj Arni
-
- UniSQL, Inc. Voice: 512 343 7372 Ext. 107
- 9390 Research Blvd. Home: 512 794 9386
- Kaliedo II FAX: 512 343 7383
- Austin, TX 78759
-
- Email: unisql!nandraj@cs.utexas.edu
- *******************************************************************
-