Mail Archives: djgpp/1999/04/11/12:25:32
From: | Gallicus AT caramail DOT com (Gallicus)
|
Newsgroups: | comp.os.msdos.djgpp
|
Subject: | Re: _String.h and unresolved externals.
|
Date: | Sat, 10 Apr 1999 16:56:28 GMT
|
Organization: | Wanadoo, l'internet avec France Telecom
|
Lines: | 45
|
Message-ID: | <371082ba.46439882@news.wanadoo.fr>
|
References: | <7emrqb$el4$1 AT news1 DOT rmi DOT net>
|
NNTP-Posting-Host: | b-adsl-nice-1-35.abo.wanadoo.fr
|
Mime-Version: | 1.0
|
X-Trace: | wanadoo.fr 923763374 19181 193.251.80.35 (10 Apr 1999 16:56:14 GMT)
|
X-Complaints-To: | abuse AT wanadoo DOT fr
|
NNTP-Posting-Date: | 10 Apr 1999 16:56:14 GMT
|
X-Newsreader: | Forte Agent 1.5/32.452
|
To: | djgpp AT delorie DOT com
|
DJ-Gateway: | from newsgroup comp.os.msdos.djgpp
|
Reply-To: | djgpp AT delorie DOT com
|
On Sat, 10 Apr 1999 00:37:56 -0600, "David Whitcombe" <mxedisn AT rof DOT net>
wrote:
>This fails:
>---------------------------------
>#include <_String.h>
>
>int main(void)
>{
> String x="Straw? No, too stupid. I put soot on warts.";
> String y=x;
> if (x==y) printf("Sit on a potato pan, Otis.");
> return 0;
>}
I had the same problem last week, and Manni gave the solution
--------------------- copy ----------------------------------
On Wed, 07 Apr 1999 08:42:16 GMT, manfred DOT heumann AT uni-bielefeld DOT de (Manni
Heumann) wrote:
>Then write a small example program like:
>
>#include <_string.h>
>int main ()
>{
> String x; // Note the capital S!
>}
>
>and compile it with:
>gxx example.cc -O3 -lgpp
>
-----------------end of copy-----------------
I was testing libgpp.a for the fun.
libstdcxx has a string class which does the same job without the same
problem
#include <string>
string str = "Hello" or
string str("hello")
works fine.
Gallicus.
- Raw text -