开发者

What is the sscanf placeholder for uint8_t types?

开发者 https://www.devze.com 2023-01-20 02:35 出处:网络
What is the sscanf placeholder for uint8_t types? I tried %u, but gcc under OS X doesn\'t lik开发者_如何转开发e it.The SCNu8 macro from inttypes.h provides it.

What is the sscanf placeholder for uint8_t types? I tried %u, but gcc under OS X doesn't lik开发者_如何转开发e it.


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);
0

精彩评论

暂无评论...
验证码 换一张
取 消

关注公众号