#include
int main()
{
printf("hello world!\n");
getchar();
}
如上程序,在新建的VS2010中能够正常的输出字符串,但是要已有的工程中,无法输出字符串,请教各位大神们,需要设置什么参数吗?
你缺少了return吧
你在已有的工程中要确保printf语句得到执行,不然不可能没有输出的。你可以打个断点调试一下
#include<stdio.h>
int main()
{
printf("hello world!\n");
getchar();
}