test.c: In function ‘main’:
test.c:10: warning: unknown conversion type character 0x20 in format
test.c:10: warning: unknown conversion type character 0x20 in format
test.c:12: warning: conversion lackstype at end of format
test.c:12: warning: unknown conversion type character 0xa in format
test.c:12: warning: conversion lacks type at end of format
test.c:12: warning: unknown conversion type character 0xa in format
gcc test.c -o test
#include <stdio.h>
#include <stdint.h>
#include <inttypes.h>
int main(int argc,char *argv[]){
uint_fast16_t n_curve,n_pt;
printf("Please enter new value \n");
scanf( "% %" SCNuFAST16 SCNuFAST16, &n_curve, &n_pt);
printf("You enter % % \n" PRIuFAST16 PRIuFAST16, n_curve, n_pt);
return 0;
}
答案 0 :(得分:6)
这不是您使用这些格式说明符的方式。你想要:
scanf("%"SCNuFAST16" %"SCNuFAST16, &n_curve, &n_pt);
和
printf("You enter %"PRIuFAST16" %"PRIuFAST16"\n", n_curve, n_pt);