From: "Charlie Hall" Newsgroups: comp.os.msdos.djgpp Subject: Re: Need help - String Class (compiling/linking) Date: Tue, 31 Oct 2000 19:22:48 -0500 Organization: MindSpring Enterprises Lines: 60 Message-ID: <8tnnpk$61u$1@slb1.atl.mindspring.net> References: <8tndkb$pu7$1 AT slb1 DOT atl DOT mindspring DOT net> <39ff50ed DOT 52358905 AT news DOT freeserve DOT net> NNTP-Posting-Host: 3f.34.0b.be X-Server-Date: 1 Nov 2000 00:23:16 GMT X-Priority: 3 X-MSMail-Priority: Normal X-Newsreader: Microsoft Outlook Express 5.00.2615.200 X-MimeOLE: Produced By Microsoft MimeOLE V5.00.2615.200 To: djgpp AT delorie DOT com DJ-Gateway: from newsgroup comp.os.msdos.djgpp Reply-To: djgpp AT delorie DOT com I tried what you suggested, and now I get the following error messages: In function 'int main()': 'String' undeclared (first use this function) parse error before '(' By the way, I get the same errors when I run it directly from RHIDE. You mentioned that _String.h is just a DJGPP thing. What is ? Is it the "standard C++" string class header? Any thoughts? Thanks, Charlie Steamer wrote in message news:39ff50ed DOT 52358905 AT news DOT freeserve DOT net... > 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