Geckoo wrote: |
---|
All is related at this Microsoft main page (and the next one) : https://docs.microsoft.com/en-us/cpp/cpp/data-type-ranges?view=msvc-170 https://en.cppreference.com/w/cpp/language/types |
Geckoo wrote: |
---|
when I want to display the size of a Char, the output gives me something like Ç ⌂ and I don't understand why. Do you have an idea? |
|
|
The types char, unsigned char, and signed char use one byte for both storage and value representation. The number of bits in a byte is accessible as CHAR_BIT or std::numeric_limits<unsigned char>::digits https://en.cppreference.com/w/cpp/language/memory_model#Byte |
The following sizeof expressions always evaluate to 1: sizeof(char) sizeof(signed char) sizeof(unsigned char) sizeof(std::byte) (since C++17) sizeof(char8_t) (since C++20) https://en.cppreference.com/w/cpp/language/sizeof#Notes |