I am using GCC 4.6.3:
我使用的是GCC 4.6.3:
gourab@gourab-RV509:~$ g++ --version
g++ (Ubuntu/Linaro 4.6.3-1ubuntu5) 4.6.3
My program results in the following compilation error:
我的程序导致了以下编译错误:
gourab@gourab-RV509:~$ g++ ArrayInput.cpp
ArrayInput.cpp:1:21: fatal error: iostream.h: No such file or directory
How can I fix it?
我怎样才能修好它?
2 个解决方案
#1
2
You want to include iostream
. iostream.h
was present in Stroustrup's C++:
你想要包括iostream。iostream。h出现在Stroustrup的c++中:
The original iostream library was written to challenge the claim that a terse, type safe I/O system needed special language support. 1 It was developed at Bell Labs by Bjarne Stroustrup and shipped with the original C++ compiler, CFront and described in the first edition of Stroustrup's The C++ Programming Language. This version of the iostream library lived in the headers iostream.h, fstream.h and so on.
最初的iostream库是为了挑战一个简洁的、类型安全的I/O系统需要特殊语言支持的说法而编写的。它是由Bjarne Stroustrup在贝尔实验室开发的,并与最初的c++编译器,CFront一起发布,在Stroustrup的第一版中描述了c++编程语言。这个版本的iostream库生活在标题iostream中。h,fstream。h等等。
The Standard C++ has the headers without the .h, so you want to:
标准c++有header没有。h,所以你想:
#include <iostream>
Here is an article that discusses this.
这是一篇讨论这个问题的文章。
#2
11
iostream.h
has not existed in C++ since some time before the language was standardised back in 1998.
iostream。自从1998年语言标准化以前,h就不存在于c++中了。
That's more than fifteen years ago.
那是15年前的事了。
Do the following:
执行以下操作:
#1
2
You want to include iostream
. iostream.h
was present in Stroustrup's C++:
你想要包括iostream。iostream。h出现在Stroustrup的c++中:
The original iostream library was written to challenge the claim that a terse, type safe I/O system needed special language support. 1 It was developed at Bell Labs by Bjarne Stroustrup and shipped with the original C++ compiler, CFront and described in the first edition of Stroustrup's The C++ Programming Language. This version of the iostream library lived in the headers iostream.h, fstream.h and so on.
最初的iostream库是为了挑战一个简洁的、类型安全的I/O系统需要特殊语言支持的说法而编写的。它是由Bjarne Stroustrup在贝尔实验室开发的,并与最初的c++编译器,CFront一起发布,在Stroustrup的第一版中描述了c++编程语言。这个版本的iostream库生活在标题iostream中。h,fstream。h等等。
The Standard C++ has the headers without the .h, so you want to:
标准c++有header没有。h,所以你想:
#include <iostream>
Here is an article that discusses this.
这是一篇讨论这个问题的文章。
#2
11
iostream.h
has not existed in C++ since some time before the language was standardised back in 1998.
iostream。自从1998年语言标准化以前,h就不存在于c++中了。
That's more than fifteen years ago.
那是15年前的事了。
Do the following:
执行以下操作: