I need to convert character pointer to a w_char * in order to use ParseNetworkString(). I've tried finding solutions to this myself, and while I have found one solution, there is one issue which blocks me from using it:
b1naryatr0phy said in an other post:
std::wstring name( L"Steve Nash" );
const wchar_t* szName = name.c_str();
this almost works for me, except that I can't just pass the string explicity, as its value is not always going to be the same, meaning I can't just put it in quotes. If I replace the parameter with a function call, then the first line gives me an error (example: std::wstring name(LgetIpAddress()); I've tried std::wstring name(L" " + getIpAddress() + " "); , thinking that it just needs a quotation mark after the L, but that doesn't work either.. any suggestions?
Thanks! :)
Extra Kudos to whoever can answer this!
link to other post: I want to convert std::string into a const wchar_t *
P.S. Sorry, just to clarify, getIpAddress returns a character pointer