[英]invalid operands of types 'volatile uint8_t* and 'uint8_t (*)
[英]What is the sscanf placeholder for uint8_t types?
uint8_t類型的sscanf占位符是什么? 我嘗試了%u,但OS X下的gcc不喜歡它。
inttypes.h
的SCNu8
宏提供了它。
還要注意,C具有字符串文字串聯,即可以:
scanf("%d %" SCNu8 " %d", &int_a, &uint8_t_b, &int_c);
聲明:本站的技術帖子網頁,遵循CC BY-SA 4.0協議,如果您需要轉載,請注明本站網址或者原文地址。任何問題請咨詢:yoyou2525@163.com.