What is the difference between Wide Character and character in C++? | Sololearn: Learn to code for FREE!
Novo curso! Todo programador deveria aprender IA generativa!
Experimente uma aula grƔtis
+ 2

What is the difference between Wide Character and character in C++?

11th Oct 2020, 9:55 AM
Arya Deep Chowdhury
Arya Deep Chowdhury - avatar
3 Respostas
+ 6
charĀ is used for so called ANSI family of functions (typically function name ends withĀ A), or more commonly known as using ASCII character set. wchar_tĀ is used for new so called Unicode (or Wide) family of functions (typically function name ends withĀ W), which use UTF-16 character set. It is very similar to UCS-2, but not quite it. If character requires more than 2 bytes, it will be converted into 2 composite codepoints, and this can be very confusing.
11th Oct 2020, 9:59 AM
RadhašŸŒ¹
RadhašŸŒ¹ - avatar
0
It will much easier if you give example of wchar_t
11th Oct 2020, 10:05 AM
Arya Deep Chowdhury
Arya Deep Chowdhury - avatar