Relay-Version: version B 2.10 5/3/83; site utzoo.UUCP Path: utzoo!utgpu!water!watmath!clyde!rutgers!ames!oliveb!pyramid!voder!apple!kanner From: kanner@apple.UUCP Newsgroups: comp.lang.c++ Subject: Static class members Message-ID: <722@apple.UUCP> Date: Tue, 5-May-87 17:37:30 EDT Article-I.D.: apple.722 Posted: Tue May 5 17:37:30 1987 Date-Received: Thu, 7-May-87 04:06:42 EDT Organization: Apple Computer, Inc., Cupertino, USA Lines: 18 Keywords: class static Section 8.5.1 of the C++ Reference Manual (page 275) states: "A data member of a class may be *static*. ... No initializer can be specified for a static member, and it cannot be of a class with a constructor." I have difficulty understanding the significance and/or motivation for that last sentence above. With respect to initializers: I have been unable to find an instance of a (non-static) class data member with an initializer; Stroustrup appears universally to initialize via a constructor in the examples in his book. So, what would an explicit initializer do? With respect to a static member of a class that has a constructor: what could be wrong with that as long as the constructor does not assign to the static member? Why not have a constructor for allocation and/or initialization of other non-static member? -- Herb Kanner Apple Computer, Inc. {idi, ios, nsc}!apple!kanner