how do i get from a wstring to a WCHAR array[]?

As said, you can use std::wcscpy() to copy from a std::wstring to a wchar_t array.

That being said, the times you should need to do so are pretty rare.
Generally the + operator along with .find() and substr() are more than up to whatever task you need.
That and using .c_str() if you need to pass the sequence to a function expecting a C-style string.

Browse More Popular Posts

Leave a Comment