Path: utzoo!utgpu!jarvis.csri.toronto.edu!rutgers!tut.cis.ohio-state.edu!gem.mps.ohio-state.edu!ginosko!uunet!mcsun!unido!mez!frei From: frei@mez.e-technik.uni-bochum.de (Matthias Frei) Newsgroups: comp.lang.c++ Subject: static member initialization (lippman's book) Message-ID: <292@mez.e-technik.uni-bochum.de> Date: 19 Sep 89 15:18:49 GMT Distribution: comp Organization: Ruhr Universitaet Bochum, W-Germany Lines: 27 I've a question to the scope of static members in Rel. 2.0. On page 441 lippman provides an example on static member initialization: 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 ? I think val is private to Y and is seen inside the class only. If that statement is legal, I hope it only may occur once near by the class definition. Or can I assign in this way everywhere ? Could somebody please clarify that point ? clarify that point ? Matthias -- Matthias Frei | Snail-mail: | Microelectronics Center frei@mez.e-technik.uni-bochum.de | University of Bochum, W-Germany frei%rubmez@unido.BITNET | D-4630 Bochum, P.O.-Box 102143