问题描述
我正在使用Eclipse IDE并通过它学习C。在下面的代码中,我从第一个版本和第二个版本中获得了两种不同的调试消息。
char text2[]="I am a string!";
puts(text2);
printf("%d\n",strlen(text2));
在第一个版本的控制台视图中,
-
21:46:32 Build Finished. 0 errors,1 warnings. (took 1s.182ms)
-
在行号旁边徘徊有警告消息:
format specifies type 'int' but the argument has type 'unsigned long' [-Wformat]
然后,在第二个构建的控制台视图中,
-
21:49:07 Build Finished. 0 errors,0 warnings. (took 79ms)
-
运行正常,并且没有显示悬停消息。
此行为不断出现,不清楚是来自IDE还是其他行为。
解决方法
暂无找到可以解决该程序问题的有效方法,小编努力寻找整理中!
如果你已经找到好的解决方法,欢迎将解决方案带上本链接一起发送给小编。
小编邮箱:dio#foxmail.com (将#修改为@)