Here is example class, the commented code in constructor works as well as the initializer.
My question is, what is the correct way?
class NClass
{
public:
int _pid;
std::wstring _name;
NClass(int pid, wchar_t * name) : _name(name)
{
//_name = name;
}
void Print()
{
std::wcout << _name;
std::getchar();
}
};
Perhaps it's another way like a copy or something, I've not used C++ for some time.
Thanks for looking in.