Pelles C > Bug reports

StringCbPrintf weirdness

<< < (2/2)

frankie:

--- Quote from: algernon_77 on August 21, 2020, 05:12:29 PM ---Aha, I see now. I was under the impression that if you assign '\0' to a widechar, only one byte would get the value.
Regards!

--- End quote ---
In C a `char` is itself an `int`, generally 8 bits wide on almost all systems, while a 'wide char' is again an `int` 16bits wide.
When you assign a `char` to a `wchar` the compiler converts the 'char' integer to a 'wchar' integer.

Navigation

[0] Message Index

[*] Previous page

Go to full version