What is the use of wchar_t in general programming?

前端 未结 7 1760
忘掉有多难
忘掉有多难 2020-12-24 01:09

Today I was learning some C++ basics and came to know about wchar_t. I was not able to figure out, why do we actually need this datatype, and how do I use it?

7条回答
  •  时光说笑
    2020-12-24 01:40

    The wchar_t data type is used to display wide characters that will occupy 16 bits. This datatype occupies "2 or 4" bytes.

    Mostly the wchar_t datatype is used when international languages like japanese are used.

提交回复
热议问题