Sign in to follow this  
Xeile

error C2065: 'String' : undeclared identifier

Recommended Posts

I'm using MS Visual C++ 6.0 I'm want to use strings in my application, but I get the error: "error C2065: 'String' : undeclared identifier". I have string.h included in my application, but still is it moaning about the issue undeclared identifier. Can someone help me out please?

Share this post


Link to post
Share on other sites
Quote:
Original post by Xeile
Now I get this error: "error C2653: 'std' : is not a class or namespace name"

What to include for this?

#include <string>

std::string myStringYay;

or...

#include <string>

using namespace std;

string myStringYay;

Share this post


Link to post
Share on other sites
Quote:
Original post by pi_equals_3
Quote:
Original post by Xeile
Now I get this error: "error C2653: 'std' : is not a class or namespace name"

What to include for this?

#include <string>

std::string myStringYay;

or...

#include <string>

using namespace std;

string myStringYay;


Thank you the first example worked.

Share this post


Link to post
Share on other sites

Create an account or sign in to comment

You need to be a member in order to leave a comment

Create an account

Sign up for a new account in our community. It's easy!

Register a new account

Sign in

Already have an account? Sign in here.

Sign In Now

Sign in to follow this