Path: utzoo!utgpu!watserv1!watmath!att!rutgers!cs.utexas.edu!sdd.hp.com!elroy.jpl.nasa.gov!ames!sgi!shinobu!odin!rome.wpd.sgi.com!jfw From: jfw@rome.wpd.sgi.com (john fergus wilkinson) Newsgroups: comp.lang.c++ Subject: Is this legal? Message-ID: <10164@odin.corp.sgi.com> Date: 10 Jul 90 17:31:29 GMT Sender: news@odin.corp.sgi.com Reply-To: jfw@rome.wpd.sgi.com (john fergus wilkinson) Lines: 19 Is this legal C++? class a { public: int x; }; class b { public: int f() {return a;} private: int a; }; As I read the discussion in Section 9.9 of Ellis and Stroustrup, this should be illegal under the rule "A class-name...may not be redefined in a class declaration after being used in the class declaration..." Am I right?