VC 中只能运行c程序,不能运行C++程序 谁能帮我解决

来源:百度知道 编辑:UC知道 时间:2024/06/14 07:35:25
我安装的VC 只能运行C 程序
不能运行c++程序
如果我运行c++程序 就现实如下错误:

Compiling...
练习.cpp
e:\c语言练习代码\练习.cpp(1) : fatal error C1083: Cannot open include file: 'iostream': No such file or directory
Error executing cl.exe.

练习.obj - 1 error(s), 0 warning(s)

哪个高手能帮我解决 十分感谢

郁闷!!VC++不能运行C++吗?

应该是你没有定义 头文件吧!
#include <iostream>

找不到iostream.h,从其他地方COPY份就可以了

你把源代码拷贝一下发过来看看吧

在#include <iostream>后面
填一句using namespace std;

你新建的文件是否是CPP文件,还有你是否有头文件,及是否有命名空间。

你是不是写成#include <iostream>了?
改成#include <iostream.h>试试。