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 209 views
1 answer 146 views
1 answer 135 views
1 answer 144 views
1 answer 148 views
...