Reputation: 1615
I am trying to write a function to convert a const char16_* to a const wchar_t* to use it in wprintf later on:
const wchar_t* wchart_from_char16(const char16_t*) {
???
}
int main(){
const char16_t* my = u"The Text I want to print";
const wchar_t* ret = wchart_from_char16(my);
wprintf(L"The Text is is: %ls ", ret);
}
How can I do this using codecvt ? This needs to work cross platform
Upvotes: 0
Views: 424