Why can't g++ find iostream.h?

时间:2022-12-17 15:07:23

Before the C++ language was standardized by the ISO, the header file was named <iostream.h>, but when the C++98 standard was released, it was renamed to just <iostream>(without the .h). Change the code to use #include <iostream> instead and it should compile.

You'll also need to add a using namespace std; statement to each source file (or prefix each reference to an iostream function/object with a std:: specifier), since namespaces did not exist in the pre-standardized C++. C++98 put the standard library functions and objects inside the stdnamespace.


https://*.com/questions/13103108/why-cant-g-find-iostream-h