difference between include <iostream> vs <iostream.h>
Hi all, can someone share difference between iostream and Iostream.h. When written in include statement does above make any difference
It may fail to compile due to simple lack of the header. ... iostream.h is deprecated by those compilers that provide it, iostream is part of the C++ standard. To clarify explicitly there is no mention of iostream.h at all in the current C++ standard
.h is the extension of header file.. for ansi we are using <iostream> and for turbo <iostream.h> ... its depend upon compiler... bt both are valid
.h is the extension of header file so we have to use it,without it you can't compile the program
As far as i know, iso c++ 2011 standard template library (STL) header files not using .h extension. In the past many compiler support stl .h extension.
iostream.h is not a part of the ISO C++ standard, iostream contains std namespace where as iostream. h does not. The only .h headers in C++ are those inherited from C like the stdio.h. The C++ standard library is guaranteed to have 18 standard headers from the C language. These headers come in two standard flavors, <cxxx> and <xxx.h> (where xxx is the basename of the header, such as stdio, stdlib, etc). These two flavors are identical except the <cxxx> versions provide their declarations in the std namespace only, and the <xxx.h> versions make them available both in std namespace and in the global namespace. The committee did it this way so that existing C code could continue to be compiled in C++. However the <xxx.h> versions are deprecated, meaning they are standard now but might not be part of the standard in future revisions.
I think we can compile using only #include<iostream> because it's an namespace standard but while using the above statement we have to include using namespace std;