Path: utzoo!attcan!utgpu!jarvis.csri.toronto.edu!mailrus!iuvax!cica!tut.cis.ohio-state.edu!gem.mps.ohio-state.edu!ginosko!uunet!pilchuck!dataio!bright From: bright@Data-IO.COM (Walter Bright) Newsgroups: comp.lang.c++ Subject: Re: Some "guidelines" for coding in C++ Message-ID: <2175@dataio.Data-IO.COM> Date: 23 Oct 89 17:19:58 GMT References: <1148@aber-cs.UUCP> Reply-To: bright@dataio.Data-IO.COM (Walter Bright) Organization: Data I/O Corporation; Redmond, WA Lines: 16 In article <1148@aber-cs.UUCP> pcg@cs.aber.ac.uk (Piercarlo Grandi) writes: < bad that it seems that in < C++ 2.0 as well enums and consts defined in a class cannot be used < in the same class, but are only visible after the class definition < is completed. This prevents you from having array sizes defined in the < class body... I thought I had a bug in Zortech 2.0 in that: class abc { enum def { A,B,C }; int func(enum def i = A); }; didn't work! (The default argument A wasn't recognized, because the class data structure was incomplete when the function declaration was parsed.) It's not clear from the 2.0 spec if this is expected to work. Is it?