tags:

views:

55

answers:

1

What is the sscanf placeholder for uint8_t types? I tried %u, but gcc under OS X doesn't like it.

+4  A: 

The SCNu8 macro from inttypes.h provides it.

Also note that C has string literal concatenation, i.e. this works:

scanf("%d %" SCNu8 " %d", &int_a, &uint8_t_b, &int_c);
R..