How to get the size of a wide character string in C++

1 Answer

0 votes
#include <iostream>

int main() {
    wchar_t str[] = L"c++ programming";
    
    std::cout << wcslen(str);
}




/*
run:

15

*/

 



answered Nov 27, 2022 by avibootz

Related questions

1 answer 198 views
1 answer 137 views
1 answer 127 views
1 answer 136 views
1 answer 131 views
...