Login | Register   
LinkedIn
Google+
Twitter
RSS Feed
Download our iPhone app
TODAY'S HEADLINES  |   ARTICLE ARCHIVE  |   FORUMS  |   TIP BANK
Browse DevX
Sign up for e-mail newsletters from DevX


Tip of the Day
Home » Tip Bank » C++
Language: C++
Expertise: Beginner
Oct 25, 1999

string.h

Question:
I am a beginner with C++ programming. I was doing fine until I came to the string data type. Here is my problem:

#include 
#include 
This gives me errors. I know it does not have anything to do with iostream, so what could be wrong with the other header?

Answer:
You're using the obsolete header names. Use and instead (without the '.h' extension). Also, add the following using directive after the #include statements:


using namespace std;
And this should work.
DevX Pro
 
Comment and Contribute

 

 

 

 

 


(Maximum characters: 1200). You have 1200 characters left.

 

 

Sitemap
Thanks for your registration, follow us on our social networks to keep up-to-date