Not a member of Pastebin yet?
Sign Up,
it unlocks many cool features!
- wchar_t *convertCharToWChar(const char *charArray) {
- wchar_t *wString = new wchar_t[4096];
- MultiByteToWideChar(CP_UTF8, 0, charArray, -1, wString, 4096);
- return wString;
- }
- /////
- wchar_t * getTranslateText(string text) {
- .....
- .....
- json responseJson = json::parse(r.text);
- string txt = responseJson.at("text")[0];
- wchar_t *wText = convertCharToWChar(txt.c_str());
- return wText ;
- }
- /////
- wchar_t *translateText = getTranslateText(outText);
- wcout << translateText << endl;
Advertisement
Add Comment
Please, Sign In to add comment