www.delorie.com/archives/browse.cgi   search  
Mail Archives: djgpp/2000/05/17/16:38:17

Message-ID: <3922DA9E.8DF00783@mtu-net.ru>
Date: Wed, 17 May 2000 21:45:02 +0400
From: "Alexei A. Frounze" <alex DOT fru AT mtu-net DOT ru>
X-Mailer: Mozilla 4.72 [en] (Win95; I)
X-Accept-Language: ru,en
MIME-Version: 1.0
To: Eli Zaretskii <eliz AT is DOT elta DOT co DOT il>
Cc: djgpp AT delorie DOT com
Subject: Re: C++, complex, etc
References: <Pine DOT SUN DOT 3 DOT 91 DOT 1000517145742 DOT 626A-100000 AT is>
X-Recipient: eliz AT is DOT elta DOT co DOT il
Reply-To: djgpp AT delorie DOT com

Eli Zaretskii wrote:
> 
> 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.  

Is standard or is <being> standartized?

> The recently-adopted ANSI/ISO C++ Standard
> includes the description of a Standard C++ Class Library.

Okay, what does it state about the complex class (what is the date of the
standard release)?

> > 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.

I said they equals machine word. I.e. 32-bit on i386+. For sure developer
can setup them differently... But this way seems to be common.

bye.
Alexei A. Frounze
-----------------------------------------
Homepage: http://alexfru.chat.ru
Mirror:   http://members.xoom.com/alexfru


- Raw text -


  webmaster     delorie software   privacy  
  Copyright © 2019   by DJ Delorie     Updated Jul 2019