I have a class:
class M { public: static std::string t[]; }; with an initialization that comes later. I want to use the M::t later in a different class (header file):
class Use { public: void f() { std::cout << M::t[0] << std::endl; } }; Is there any way to achieve this without including the whole class M for the header file of the Use? I understand that forward declarations do not allow accessing class members, however this beauty is a static one, so it shouldn't be a huge problem for the compiler..