What is the advantage of using uint8_t over unsigned char in C?
uint8_t
unsigned char
I know that on almost every system uint8_t is just a typedef for unsigned char, so why use it?
It documents your intent - you will be storing small numbers, rather than a character.
Also it looks nicer if you're using other typedefs such as uint16_t or int32_t.
uint16_t
int32_t
2.1m questions
2.1m answers
60 comments
57.0k users