Path: utzoo!news-server.csri.toronto.edu!cs.utexas.edu!sdd.hp.com!think.com!snorkelwacker.mit.edu!bloom-picayune.mit.edu!ahodgson From: ahodgson@athena.mit.edu (Antony Hodgson) Newsgroups: comp.lang.c++ Subject: Borland C++ changes static member initialization Message-ID: <1991Mar7.214212.3371@athena.mit.edu> Date: 7 Mar 91 21:42:12 GMT References: <198@valid.valid.com> Sender: news@athena.mit.edu (News system) Organization: Massachusetts Institute of Technology Lines: 14 I tried to recompile some old code under BC++, only to have the linker fail. It turns out that static member functions must be explicitly declared and initialized OUTSIDE the class definition; apparently this is in conformance to some ANSI standard. E.g. OLD (TC++): class Static { static int i; ... } NEW (BC++): // must add the following: int Static::i = INITIALVALUE; Hope this saves a few $$ in calls to tech support. Tony Hodgson