vc++2008

来源:百度知道 编辑:UC知道 时间:2024/09/28 09:06:57
我输入这样一个程序,也显示好多错误!
#include<stdio.h>
void main()
{
printf("gfdgfdg");
}
Compiling...
xl2.cpp
d:\backup\我的文档\visual studio 2008\projects\15\15\xl2.cpp(5) : error C2065: 'i' : undeclared identifier
d:\backup\我的文档\visual studio 2008\projects\15\15\xl2.cpp(5) : error C2065: 'i' : undeclared identifier
15 - 33 error(s), 0 warning(s)
========== 生成: 成功 0 个,失败 1 个,最新 0 个,跳过 0 个 ==========

重新建一个工程看看
应该是你当前工程的文件不是你正在编辑的这个文件

既然是VC++就用标准点的C++试试

#include<iostream>
using namespace std;

int main()
{
cout << "gfdgfdg" << endl;

return 0;
}

看错误好像不是当前的这个文件,点击上面的菜单"生成"->"重新生成解决方案"试试看

不行的话就重新建立一个工程,将程序代码敲进去看看