Mail Archives: djgpp/1999/03/18/04:37:24
In article <36f06f5e DOT 590365630 AT nntp DOT rz DOT uni-karlsruhe DOT de>, henrypijames AT mailcity DOT com (Henry 'Pi' James) wrote:
>Hi!
>
>As a DJGPP beginner , I use RHIDE to somehow test around. Soon I came
>to a problem. I wrote the following codes.
>
>#include <strclass.h>
>int main(void) {
> String str;
> str = "123";
> str += '4';
> str += "567";
> return 0;
>}
>
You are trying to use the GNU String class (note the capital S). This is
included in libgpp, which is deprecated. This class is not defined in the
standard and it is not portable.
Better use the standard string class (note the lowercase s) by including
<string> (note the missing ".h").
You can find documentation for this class in any book on standard C++ (e.g.
Stroustrup's "The C++ Programming language", 3rd ed.).
Or on the web (e.g. http://www.dinkumware.com/refcpp.html).
----------------------------------------------------------------------
Manni Heumann
Bielefeld, Germany
Spammers use reply-address,
all others use: mheumann AT post DOT uni-bielefeld DOT de
----------------------------------------------------------------------
- Raw text -