How to concatenate wide character strings in C++

1 Answer

0 votes
#include <iostream>
#include <cwchar>

int main() {
    wchar_t str[64] = L"c++";
    wchar_t str_copy[32] = L" and c programming";
    
    wcscat(str, str_copy);
    
    std::wcout << str;
}




/*
run:

c++ and c programming

*/

 



answered Nov 27, 2022 by avibootz

Related questions

2 answers 207 views
1 answer 136 views
1 answer 116 views
116 views asked Aug 7, 2024 by avibootz
1 answer 106 views
106 views asked Aug 7, 2024 by avibootz
1 answer 147 views
147 views asked Jun 22, 2017 by avibootz
1 answer 171 views
171 views asked Jun 22, 2017 by avibootz
...