#include <stdio.h>
int main(void)
{
char max[20];
scanf("%s",max);
printf("===========\n");
printf("\"%s\"\n",max); //比输出的字符宽3个字段要怎写?求指点! (就是不管输出什么都多3个字段)
return 0;
}
直接复制没贴显示:
/home/msn/codeflie/2.c: 在函数‘main’中:
/home/msn/codeflie/2.c:9:2: 警告: 字段宽度限定 ‘*’ expects argument of type ‘int’, but argument 2 has type ‘size_t’ [-Wformat]
错在哪里,求详细解说!谢谢!
为什么只有在strlen前面+上int才不会出错啊?
本回答被提问者采纳