关于VC++6.0的 Cannot compile 对话框

来源:百度知道 编辑:UC知道 时间:2024/05/28 08:09:23
我写好了程序以后出现了
Cannot compile the file 'D:\Program Files\Microsoft Visual Studio\MyProjects\test\2_1.cpp'; no compile tool is associated with the file extension.
这是什么意思?不能编译吗?
我写的程序也没有错啊
#include<iostream.h>
void main()
{
cout<<"Welcome!"<<endl;
}
电脑出毛病了?
下面2位朋友的答案还是不行
不知道是不是因为我从网上下载的那个版本有问题?

Cannot compile the file 'D:\Program Files\Microsoft Visual Studio\MyProjects\test\2_1.cpp'; no compile tool is associated with the file extension.意思是:不能编译2_1.CPP,没有编译工具跟文件扩展名关联.

你看下是不是你的扩展名弄错了??或者你在你的D:\Program Files\Microsoft Visual Studio\MyProjects\test 下,删除你现有的2_1.cpp,然后随意在这个地方建立一个.txt文档,然后改名,改成2_1.cpp,然后再打开这个2_1.cpp,然后再重新输入代码,然后再编译运行,试下?应该行的.

需要新建一个 win32 console

这个问题是后缀的问题。一定是你第一次建立代码保存文件是以(***.H)为后缀的。解决方法就是自己手动修改后缀为(***.cpp)在用VC++6.0打开。编译就好了

文件名有错误
不能用数字开头