iostream.h问题 [英] iostream.h problem

查看:71
本文介绍了iostream.h问题的处理方法,对大家解决问题具有一定的参考价值,需要的朋友们下面随着小编来一起学习吧!

问题描述




我是c ++ nub,我有一个简单的文件in.cpp,我使用.net编译,但它给了我一个错误:


" 致命错误C1083:无法打开包含文件:''iostream.h'':没有这样的文件或目录"。


我可以在哪里获取iostream.h文件,以便我可以将它附加到标题中。


THX = P

Hi,

i''m a c++ nub, i got a simple file in.cpp which i uses .net to compile but it gives me an error:

"fatal error C1083: Cannot open include file: ''iostream.h'': No such file or directory".

may i noe where do i get the iostream.h file so tat i can attach it to the header.

THX =P

推荐答案

应该只是确保在编译包含路径中有iostream.h的包含路径。


iostream.h应该已经分发使用Visual Studio
Should just be a case of making sure you have the include path to iostream.h in your compiler include paths.

iostream.h should have been distributed with Visual Studio





下面是我试图运行的c ++脚本,它的脚本给了我错误。 />

thanx回复




below is the c++ script which i try to run and its the script tat given me the error.

thanx for the reply


展开 | 选择 | Wrap | 行号


这里有几点需要注意。您提到.NET - 您是将该项目创建为.NET项目还是控制台应用程序?它应该是一个控制台应用程序。我想你只是意味着你正在使用Visual Studio.NET。


我不知道MS的最新版本的C ++但是.h头文件已被弃用了一段时间,可能已被删除。不知何故,我怀疑他们将永远停止运送旧的.h文件,因为这会破坏向后兼容性。虽然Banfa可能是对的,但我想知道这个包含目录是如何被删除的?


你也可以尝试在你自己没有创建的所有头文件上删除.h扩展名像这样:

#include< iostream>

#include< cstdlib>

#include< ctime>

using namespace std;

//定义最大值:

#define MAX_RANGE 100

...

哦,请永远不要把C ++程序的''脚本'称为。
Several things to note here. You mentioned .NET - did you create this project as a .NET project or as a console application? It should be a console appliation. I guess you just meant you are using Visual Studio.NET.

I don''t know about the latest versions of C++ from MS but the .h header files have been deprecated for quite some time and could have been removed. Somehow I doubt they''ll ever stop shipping the old .h files as that would break backwards compatibility. Although Banfa is probably right, I wonder how that include directory could have been dropped?

You could also try dropping the .h extension on all header files that you didn''t create yourself like this:
#include<iostream>
#include<cstdlib>
#include<ctime>
using namespace std;
// Define the greatest possible value:
#define MAX_RANGE 100
...

Oh, please don''t ever call C++ programs ''scripts'', ever.


这篇关于iostream.h问题的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持IT屋!

查看全文
登录 关闭
扫码关注1秒登录
发送“验证码”获取 | 15天全站免登陆