我正在尝试在我的类中创建一个静态字符串:(在我的头文件中)
static string description = "foo";
但我收到此错误:
IntelliSense: a member with an in-class initializer must be const
如果我将其更改为:
static const string description = "foo";
我收到了这个错误:
IntelliSense: a member of type "const std::string" cannot have an in-class initializer
我做错什么了?