Path: utzoo!censor!geac!torsqnt!news-server.csri.toronto.edu!cs.utexas.edu!uunet!microsoft!jimad From: jimad@microsoft.UUCP (Jim ADCOCK) Newsgroups: comp.lang.c++ Subject: Re: Array of class objects Keywords: array, initialization, class objects Message-ID: <59511@microsoft.UUCP> Date: 3 Dec 90 19:32:08 GMT References: <1756@enuxha.eas.asu.edu> <1990Nov15.050358.16043@clear.com> Reply-To: jimad@microsoft.UUCP (Jim ADCOCK) Organization: Microsoft Corp., Redmond WA Lines: 35 In article <1990Nov15.050358.16043@clear.com> rmartin@clear.com (Bob Martin) writes: |I'll take a stab at answering this. My manual (which happens to be |the version of the ARM published by SUN) says in 12.1 that: | | "A default constructor for a class X is a constructor of the | form X::X(). A default constructor will not be generated for | a class X if any constructor has been declared for class X. ACK! *My* manual [which happens to *the* version of ARM, published by Addison-Wesley in 1990 ISBN 0-201-51459-1 in an ugly reddish-brown cover] says: "A default constructor for a class X is a constructor of class X that can be called without an argument. [A default constructor is typically of the form X::X(), but a constructor that can be called with no arguments because it has default arguments, X::X(int=0), for example, is also a default constructor.]" My copy of the ANSI-C++ committee working paper X3J16/90-0091 dated Oct 23 1990 speaks similarly. Please do not quote an individual vendor's reference manuals as being "the" facts on C++. At best these manuals will tend to lag a year or so behind the standardizations effort. At worse, they may contain gratuitous incompatibilities and/or extensions. Please quote either directly from Ellis & Stroustrup's ARM [the reddish-brown book from Addison-Wesley ISBN 0-201-51459-1] or from the ANSI-C++ committee's working papers. By so quoting from the language standards, we put pressure on vendors to make their compilers conform to the standard, rather than allow arguments to develop as to who's compiler is "right." [There is no ARM except *the* ARM. Get it. :-] Brought to you by Super Global Mega Corp .com