From: Michael Schuster Newsgroups: comp.os.msdos.djgpp Subject: Re: STRING problems! Date: Wed, 29 Apr 1998 06:53:22 GMT Organization: Regionales Rechenzentrum Erlangen, Germany Lines: 38 Message-ID: <19980429.6532273@seneca> References: <35462A31 DOT 4E83C790 AT acpub DOT duke DOT edu> <3546360D DOT 7114 AT cs DOT com> <35464CC1 DOT 4E00589F AT acpub DOT duke DOT edu> NNTP-Posting-Host: eev6.e-technik.uni-erlangen.de Mime-Version: 1.0 Content-Type: text/plain; charset=ISO-8859-1 To: djgpp AT delorie DOT com DJ-Gateway: from newsgroup comp.os.msdos.djgpp Content-Transfer-Encoding: 8bit Precedence: bulk Hi Robert! You got 3 errors in your program below: 1. You have to include <_string.h>. includes the standart C- String functions such as strcpy(), strcmp() etc. <_string.h> includes the C++ String class. 2. the name of the String class is „String“ and not „string“ 3. your String-object is „word“ and not „test“. therfore substitute cout<< test with cout<< word. 4. Compile with gxx test.cc (asuming you named your test prog test.cc > #include > #include > > int main() > { > string word = "test"; > cout << test << endl; > return 0; > } Here the „improved version“ #include #include <_string.h> int main() { String word = "test"; cout << word << endl; return 0; } hope that helps. Michi