www.delorie.com/archives/browse.cgi | search |
From: | Gallicus AT caramail DOT com (Gallicus) |
Newsgroups: | comp.os.msdos.djgpp |
Subject: | Re: Help with C++ library |
Date: | Mon, 05 Apr 1999 17:14:58 GMT |
Organization: | Wanadoo - (Client of French Internet Provider) |
Lines: | 35 |
Message-ID: | <3709ef2f.41511299@news.wanadoo.fr> |
References: | <370982e5 DOT 13785014 AT news DOT wanadoo DOT fr> |
NNTP-Posting-Host: | b-adsl-nice-1-171.abo.wanadoo.fr |
Mime-Version: | 1.0 |
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 Mon, 05 Apr 1999 09:34:19 GMT, Gallicus AT caramail DOT com (Gallicus) wrote: >I use the last version of Djgpp. >C programs works OK. > >I am testing the C++ library. >To test the String C++ class I wrote: >#include <iostream> >#include <_String.h> >int main() { > String str = "Hello "; > String str1 = "boys!"; > cout << str + str1 << endl; > return 0; >} >Compiling is OK. Linking aborts. >I get : undefined reference to "String:: ...." >What is the problem ? 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.
webmaster | delorie software privacy |
Copyright © 2019 by DJ Delorie | Updated Jul 2019 |