So it looks like I can't do this for some reason...
class MyClass
{
static std::string name = "Whatever";
};
I don't get it, for me it would make sense to define something in the declaration, even if is static, but instead, I have to do this... ¿?¿?¿?
class MyClass
{
static std::string name;
};
std::string MyClass::name = "Whatever";
And by the way... Isn't name private by default? Then why can I change its value from outside the class?