新建一控制台工程Console Project,在头文件里加上stdio.h库就可以了
打开VS2005->File->New->Project->New Project->Visual C++->Win32->Win32 Console Application.
输入工程名->单击OK->Next->Finish,然后你会看到这样一个文件...
#include "stdafx.h"
int _tmain(int argc, _TCHAR* argv[])
{
return 0;
}
把它改成
#include "stdafx.h"
#include <stdio.h>
int _tmain(int argc, _TCHAR* argv[])
{
int a;
printf("hello");
scanf("%d", &a);
return 0;
}
这样就可以了!
0xBAADF00D