Path: utzoo!attcan!uunet!tut.cis.ohio-state.edu!pt.cs.cmu.edu!rochester!kodak!ektools!randolph From: randolph@ektools.UUCP (Gary L. Randolph) Newsgroups: comp.lang.c++ Subject: Scoping bug??? Message-ID: <2582@ektools.UUCP> Date: 11 Apr 90 14:16:17 GMT Sender: randolph@ektools (Gary L. Randolph) Organization: Eastman Kodak, Dept. 47, Rochester N.Y. Lines: 42 This was posted twice previously but I have reason to believe it was only sent locally (didn't get outside Rochester). There appears to be a scoping problem with locally defined classes that contain a member function. The following example compiles without a hitch on my Sun. I am using Sun's 2.0 cfront. By commenting out the member function (and the call) the compiler correctly generates an error, but as is, the compiler does not recognize a problem. Am I missing somthing? Sure smells like a bug. #include main() { void func(); //prototype //local class definition class X{ public: int i; float f; void printIt(){cout<<"\nHello\n";} }c; c.i = 1; c.f = 3.3; c.printIt(); cout<<"\ni: "<