Path: utzoo!utgpu!news-server.csri.toronto.edu!rpi!usc!snorkelwacker.mit.edu!bloom-picayune.mit.edu!ahodgson From: ahodgson@athena.mit.edu (Antony Hodgson) Newsgroups: comp.lang.c++ Subject: Re: Borland C++ bugs Keywords: C++, Borland, static Message-ID: <1991Apr2.222845.918@athena.mit.edu> Date: 2 Apr 91 22:28:45 GMT References: <1991Apr01.221830.442@groucho> Sender: news@athena.mit.edu (News system) Organization: Massachusetts Institute of Technology Lines: 36 In article <1991Apr01.221830.442@groucho> lowthe861@snake.cs.uidaho.edu () writes: >I recently got the new version of Borland C++, and I have already found what I think is an error. I compiled the following program on V1.0 and it ran fine, >but on V2.0, I get an error. Could someone please tell me if this is a change in the language, and if so why, or is it a genuine BUG. This is not an error; it is a change which makes BC++ more compatible with emerging C++ standards. > > Thank you. > >#include > >class circle >{ > static int arc; // <******** Initialize arc; see below > public: > void set_arc(int new_arc); >} > >void circle::set_arc(int new_arc) >{ > arc = new_arc; >} // arc must be explicitly initialized outside of the class definition so // that it's value is available to the first instantiation of circle. int circle::arc = 0; > >main() >{ > circle c1; >} Tony Hodgson ahodgson@hstbme.mit.edu