Path: utzoo!utgpu!news-server.csri.toronto.edu!cs.utexas.edu!know!sdd.hp.com!elroy.jpl.nasa.gov!ncar!dinl!noren From: noren@dinl.uucp (Charles Noren) Newsgroups: comp.lang.c++ Subject: Re: Static member definition vs. declaration? Message-ID: <1851@dinl.mmc.UUCP> Date: 18 Apr 91 18:20:24 GMT References: <1848@dinl.mmc.UUCP> Reply-To: noren@dinl.UUCP (Charles Noren) Organization: Martin Marietta I&CS, Denver CO. Lines: 27 Thanks to all who have responded to my question. I've tried thanking personally to all who responded but my mail often bounces. The answer to the question of a static member declaration, e.g., class X {static int myVar;}; is that somewhere the static member must be defined, such as, int X::myVar; The reason my compiler permitted no definition was that my linker was probably smart to infer a definition when one was not explicitly found. Also many have pointed out that C++ compilers imperfectly implement the C++ "standard". Thanks again. -- Chuck Noren NET: dinl!noren@ncar.ucar.edu US-MAIL: Martin Marietta I&CS, MS XL8058, P.O. Box 1260, Denver, CO 80201-1260 Phone: (303) 977-1646