Sublime Forum

C programming : uint8_t values are always printed as "zero"

#1

Dear all,

I use Sublime Text and MinGW (gcc) to develop C programs.

If I declare a value as “int” I can get the correct value with “printf(“value = %d”,value);”

If I declare a value as “uint8_t” or “int8_t” or “uint16_t” or “int16_t” the compilation is OK but I always get “value = 0” with “printf(“value = %d”,value);”.

As usual, I use “#include <stdint.h>” at the beginning of my program. I compile with gcc.

Do you have any idea to solve my problem please ? Thank you very much ! Regards

0 Likes