Path: utzoo!attcan!utgpu!jarvis.csri.toronto.edu!rutgers!apple!brutus.cs.uiuc.edu!lll-winken!ames!pacbell!hoptoad!hsfmsh!dumbcat!marc From: marc@dumbcat.UUCP (Marco S Hyman) Newsgroups: comp.lang.c++ Subject: Re: static member initialization (lippman's book) Summary: declaration of static member is not a definition Message-ID: <108@dumbcat.UUCP> Date: 21 Sep 89 01:41:45 GMT References: <292@mez.e-technik.uni-bochum.de> Reply-To: marc@dumbcat.UUCP (Marco S Hyman) Distribution: comp Organization: MH Software, Hayward, Ca. Lines: 20 In article <292@mez.e-technik.uni-bochum.de> frei@mez.e-technik.uni-bochum.de (Matthias Frei) writes: class Y { ... stuff deleted private: static int val; }; int Y::val = 1; Is the statement Y::val = 1 a bug in the book, or are the scope rules from Rel 1.2 invalid ? As ark has responded it's not an error. The thing to remember is that ``The declaration of a static member in its class declaration is *not* a definition.'' That quote is from the AT&T C++ Release 2.0 Product Reference Manual. --marc -- // Marco S. Hyman {ames,pyramid,sun}!pacbell!dumbcat!marc