Path: utzoo!attcan!uunet!mcvax!ukc!warwick!expya!msor!kt From: kt@msor.UUCP (Keith Tizzard) Newsgroups: comp.lang.c++ Subject: static members Message-ID: <360@msor0.UUCP> Date: 23 May 89 12:07:02 GMT Sender: Keith Tizzard Reply-To: kt@msor.UUCP (Keith Tizzard) Organization: MSOR Department, Exeter University, UK Lines: 24 Can anyone please help to explain a sentence in Stroustrup's reference manual. On page 275 section 8.5.1 STATIC MEMBERS the last sentence states: "No initializer can be specified for a static member, and it cannot be of a class with a constructor." Two points arise: 1 the meaning of the piece after the comma is not clear to me - does it really mean that if I provide a constructor for a class then I cannot have a static member variable in that class? Zortech C++ appears to allow it - is it in error? 2 I understand the first part of the sentence but why does this restriction exist? -- Keith Tizzard MSOR Dept, University of Exeter, Streatham Court, EXETER EX4 4PU, UK tel: (+44) 0392 264463 email: kt@msor.exeter.ac.uk kt@msor.UUCP