www.delorie.com/archives/browse.cgi   search  
Mail Archives: djgpp/1999/04/06/20:22:05

Newsgroups: comp.os.msdos.djgpp
From: manfred DOT heumann AT uni-bielefeld DOT de (Manni Heumann)
Subject: Re: Help with C++ library
References: <370982e5 DOT 13785014 AT news DOT wanadoo DOT fr> <3709ef2f DOT 41511299 AT news DOT wanadoo DOT fr>
X-Newsreader: News Xpress 2.01
Date: Mon, 05 Apr 1999 21:18:19 GMT
NNTP-Posting-Host: ppp39-82.hrz.uni-bielefeld.de
Message-ID: <370928a7.0@news.uni-bielefeld.de>
X-Trace: 5 Apr 1999 23:18:31 +0200, ppp39-82.hrz.uni-bielefeld.de
Lines: 38
To: djgpp AT delorie DOT com
DJ-Gateway: from newsgroup comp.os.msdos.djgpp
Reply-To: djgpp AT delorie DOT com

Gallicus AT caramail DOT com (Gallicus) wrote:

>With these corrections it works :
>
>#include <string>
>int main() {
>  string str = "Hello", str1 = " boys!";
>  cout << str + str1  << endl;
>  return 0;
>}
>
>It is pleasant to concatenate with +.
>There are some lines in the Doc about <_String.h> and <string> but it
>remains mysterious for me.
>
>Gallicus.

It was for me, too.
But it is quite simple: c++ as a official standard only since last year. 
Before that there only were drafts. So the different implementations (aka 
compilers) all had their own string class. The GNU string class, that you can 
find in libgpp, is the one with the capital S (included with <_string.h>. The 
new c++ library libstdcxx contains the string class that the standard 
prescribes (included with <string>).
But over the long run nobody needs two c++ libraries, so libstdcxx will take 
the place of libgpp, which allready happened when it comes to the default 
library used for djgpp c++ programs.
The documentation side of that, is the dark side. There are some documents on 
the net, and thanks to the standard they should apply to any compiler. But I 
don't think that there is any GNU documentation (and by the way the docs for 
libgpp were excellent).

Seeing clearer now?

Manni

PS: Please don't ask, why they dropped the .h for the include files. This 
one's the real mystery.

- Raw text -


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