Original Post
I am probably being a complete noob and not understanding the operator overload function so could someone please tell me why this isn't working:
Quote:basically what I am trying to do is hide all the windows code so that in my high level classes so you can submit "some text value" to a low level method then I can easily do something like WCHAR* wszName = passedName; instead of having to write a method that I am constantly calling or having to enter windows specific syntax in my high level classes, eg L"some text value". I may just be putting my operator overload in the wrong place. At the moment its just in my class definition where I'll be wanting to convert it. I maybe completely misunderstanding the idea of abstracting my code so can some please help me out, Thanks.
WCHAR* operator=( char n[] ) {WCHAR *wszName;WCHAR wszBuf[MAX_PATH];wszName = wszBuf;MultiByteToWideChar( CP_ACP, 0, n, -1, wszName, MAX_PATH );return wszName;}