Date: Wed, 17 May 2000 15:02:21 +0300 (IDT) From: Eli Zaretskii X-Sender: eliz AT is To: "Alexei A. Frounze" cc: djgpp AT delorie DOT com Subject: Re: C++, complex, etc In-Reply-To: <39224964.BBFA67CB@mtu-net.ru> Message-ID: MIME-Version: 1.0 Content-Type: TEXT/PLAIN; charset=US-ASCII Reply-To: djgpp AT delorie DOT com Errors-To: nobody AT delorie DOT com X-Mailing-List: djgpp AT delorie DOT com X-Unsubscribes-To: listserv AT delorie DOT com Precedence: bulk On Wed, 17 May 2000, Alexei A. Frounze wrote: > > > IMHO there must no be any C++ library, just a C++ compiler itself, if people > > > don't have standard for C++ library. > > > > I don't think this is possible. All the C++ classes are implemented > > in a library (libstcxx.a, in the DJGPP case). You *must* have that > > library, and you *must* include the appropriate headers, if you want > > to use data types other than the basic ones (int, char, etc.). > > I can define my own classes instead. Sure. And you can define your own complex type as well, assuming that you write all the code that implements it. > So why should I use C++ library, if it's not standartized? Because it *is* standardized. The recently-adopted ANSI/ISO C++ Standard includes the description of a Standard C++ Class Library. > Btw, what so I need size_t for, if both size_t and > int equal the same machine word? You need it for portability. size_t is not equal to int. Its precise definition depends on the implementation. For example, a 64-bit machine could use unsigned long (64-bit) for size_t. There are library functions that accept or return size_t, and if you use int instead, you will get either warnings or bugs.