Mail Archives: djgpp/1997/05/19/19:16:58
Tony O'Bryan <aho450s AT nic DOT smsu DOT edu> skrev i inlägg
<33806a96 DOT 5931584 AT ursa DOT smsu DOT edu>...
> On 19 May 1997 10:01:51 GMT, "Lorenzo Soncini" <lsoncini AT mbox DOT linknet DOT it>
wrote:
>
> > How can I use the string data type with DJGpp ?
>
> there is no string data type per se in DJGPP (or C for that matter).
True, but there *is* a string class in (the working paper for) C++, and
it's implemented in the C++lib for DJGPP. It's declared in the header
std/string.h, which in turn uses the declaration for basic_string from
std/bastring.h.
I suppose you would use it like this:
#include <iostream.h>
#include <std/string.h>
int main()
{
string s("Hello world!");
cout << s << endl;
return 0;
}
(On my system, this works when compiled with gxx, but not when compiled
with RHIDE (no errors even with RHIDE, though).)
- Raw text -