I`m trying to define a variable of string type in a class definition in a header file. Is it possible?
Example:
/* Foo.h */
#include <string>
class Foobar{
int a;
string foo;
}
Because somehow in main I can declare a string variable, but in the header it doesn’t recognize my string type.
stringlives in namespacestd. Make that: