Mail Archives: djgpp/1999/04/06/20:22:05
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 -