vendredi 6 mars 2015

How can I get the nth character of a wchar_t?

given:



wchar_t* str = L"wide chars";


how get i extract one character at a time in c (not c++)?


for example, I tried



for (int i = 0; i < wcslen(str); i++) {
printf("%wc\n", str[i]);
}


But only gave me gibberish


Aucun commentaire:

Enregistrer un commentaire