vaithilingam R
asked on
conversion
how to convert from std::wstring to wchar_t*
SOLUTION
membership
This solution is only available to members.
To access this solution, you must be a member of Experts Exchange.
ASKER CERTIFIED SOLUTION
membership
This solution is only available to members.
To access this solution, you must be a member of Experts Exchange.
I just had luck 'strdup' expects a const pointeryou shouldn't say luck. i am pretty sure it is experience that you posted working and compilable code.
Sara
LOL, thanks Sara, what a compliment, this really made my day better :o))
2 valid solutions where the accepted solution doesn't require to free buffers after use.
Sara
Sara
The 'strdup' was just the first idea I had for a sample to show use of 'c_str()', it was not my intention to suggest using this to get a none-const pointer - and I just had luck 'strdup' expects a const pointer and returns a none-const pointer, so the code at least should compile ;o)
Best regards,
ZOPPO