From: Jason Green Newsgroups: comp.os.msdos.djgpp Subject: Re: string class help Date: Sun, 11 Jun 2000 19:09:57 +0100 Organization: Customer of Planet Online Lines: 25 Message-ID: References: <8i0bah$858$1 AT violet DOT singnet DOT com DOT sg> NNTP-Posting-Host: modem-123.einsteinium.dialup.pol.co.uk Mime-Version: 1.0 Content-Type: text/plain; charset=us-ascii Content-Transfer-Encoding: 7bit X-Trace: newsg4.svr.pol.co.uk 960746980 4397 62.136.69.123 (11 Jun 2000 18:09:40 GMT) NNTP-Posting-Date: 11 Jun 2000 18:09:40 GMT X-Complaints-To: abuse AT theplanet DOT net X-Newsreader: Forte Agent 1.7/32.534 To: djgpp AT delorie DOT com DJ-Gateway: from newsgroup comp.os.msdos.djgpp Reply-To: djgpp AT delorie DOT com "Low Yew Sing" wrote: > Hi , > can anyone give an eg of how to use the string class provided by DJGPP. > i have written a small section of code using the string class provided. > However, the complier does not recognise the string initialisation. > e.g string example; // no recognition given for this declaration // strhello.cpp #include #include using namespace std; int main() { string s = "Hello"; s += ' '; s += "World!"; cout << s << endl; } Compile with something like: gpp -Wall strhello.cpp -o strhello BTW, The string class is not specific to DJGPP so any good C++ book should explain it and provide examples of its usage. You could probably find more examples posted in a C++ language group.