qq_37377651
大河向东流啊
2018-11-15 14:19

ubuntu16.04编译c遇到警告

  • c
  • ubuntu
  • printf

警告如下:
test1.c:7:12: warning: format ‘%x’ expects argument of type ‘unsigned int’, but argument 2 has type ‘int *’ [-Wformat=]
printf("%x %d",p,b);
#include
int main()
{
int a=100,b=200;
int *p;
p=&a;
printf("%x %d",p,b);
//printf("\n%d %d",&a,&b);
return 0;
}

  • 点赞
  • 回答
  • 收藏
  • 复制链接分享

2条回答

为你推荐