How to use int16_t or int32_t with functions like scanf [duplicate]

For those you need to use the macros from inttypes.h such as SCNd64 or SCNu32 etc.

scanf("%" SCNd32, &x);

Leave a Comment