What you can do is declare the string in the header and initialize it in your .cpp.
in MyClass.h
#include <string>
class MyClass
{
static std::string foo;
}
in MyClass.cpp
#include "MyClass.h"
std::string MyClass::foo = "bar"
What you can do is declare the string in the header and initialize it in your .cpp.
in MyClass.h
#include <string>
class MyClass
{
static std::string foo;
}
in MyClass.cpp
#include "MyClass.h"
std::string MyClass::foo = "bar"