I'm sorry I saw the error has been posted many times, but they didn't seem similar.
Error: public: static class std::basic_string<char,struct std::char_traits<char>,class std::allocator<char> > Class::path" (?path@Class@@2V?$basic_string@DU?$char_t
I was hoping I could run a function getPath
that would take a file name and store it to a string. Somehow it doesn't work when using static?
class Class {
public:
static std::string path;
static void getPath();
};
void Class::getPath(PCWSTR FileName) {
std::wcout << "FileName: " << FileName << std::endl;
Class::path = "FileName";
}