Tek-Tips is the largest IT community on the Internet today!

Members share and learn making Tek-Tips Forums the best source of peer-reviewed technical information on the Internet!

  • Congratulations Wanet Telecoms Ltd on being selected by the Tek-Tips community for having the most helpful posts in the forums last week. Way to Go!

why string object not accepted in latest compiler?

Status
Not open for further replies.

goodtalka

Programmer
Jun 11, 2002
12
IN
Why is string class not accepted in latest gcc-c++ compiler. Actually I was using Redhat linux 7.1 and had coded using standard string objects. I recently installed Redhat Linux 8.0, when I compiled the same code it gave list of errors which was all related to using string objects. It says 'string undeclared'. I have included <string> header in the program.
 
Is the string class in a namespace ?

#include <string>
using namespace std;

may solve the problem ?

/JOlesen
 
//Also
#include <string>
using std::string;
...
{
string x;
}

//or
#include <string>
...
{
std::string x;
}


Ion Filipski
1c.bmp


filipski@excite.com
 
Status
Not open for further replies.

Part and Inventory Search

Sponsor

Back
Top