From: dontmailme AT iname DOT com (Steamer) Newsgroups: comp.os.msdos.djgpp Subject: Re: Need help - String Class (compiling/linking) Date: Tue, 31 Oct 2000 23:08:56 GMT Organization: always disorganized Lines: 39 Message-ID: <39ff50ed.52358905@news.freeserve.net> References: <8tndkb$pu7$1 AT slb1 DOT atl DOT mindspring DOT net> NNTP-Posting-Host: modem-99.blue-angel.dialup.pol.co.uk X-Trace: news7.svr.pol.co.uk 973033736 19753 62.136.234.99 (31 Oct 2000 23:08:56 GMT) NNTP-Posting-Date: 31 Oct 2000 23:08:56 GMT X-Complaints-To: abuse AT theplanet DOT net X-Newsreader: Forte Free Agent 1.11/32.235 To: djgpp AT delorie DOT com DJ-Gateway: from newsgroup comp.os.msdos.djgpp Reply-To: djgpp AT delorie DOT com Charlie Hall wrote: >I've successfully written and run programs that use , is non-standard, so it's better to use . (Remember, however, that this puts everything in namespace std.) >and I've just attempted to use the String class, >which I assume is in <_String.h>. <_String.h> is just a DJGPP thing - what you want is . > Here's my code: > > // Program: list.cpp > #include <_String.h> > > int main() > { > String s1('a'); > return 0; > } Try this: #include using std::string; int main() { string s1("a"); return 0; } Compile like this: gpp -Wall -O2 list.cpp -o list.exe