I'm having an issue with strings in a header file in my XCode 5.0.2 project. I'm very new to C++ and trying to understand what is going on. Here is my code:
#include <string>
#ifndef Blah__H
#define Blah__H
class Blah {
char kind;
std::string str;
Blah(char ch) : kind(ch), str("") { }
Blah(char ch, std::string s) : kind(ch), str(s) { }
};
#endif /* defined(Blah__H) */
The error Xcode is giving me says "No type named 'String' in namespace 'std'; did you mean 'string'?"
I've tried removing the std:: and as I expected, it complained that it needed them. What am I doing wrong? I cannot figure out why it is looking for a type 'String' (capital S), whereas my code says 'string'.
Thanks in advance for your help!