C++/problem in c++
Expert: vijayan - 2/6/2009
Questionwhat to do if an error "unable to open file iostream .h" is displaying and how to change or correct the path to resolve this error
Answer<iostream.h> is not (and never has been) a standard C++ header.
many compilers still support it (for compatibility reasons, it is a header that was in use before the IS for C++ was adopted). not all compilers have it (and as newer versions of compilers are released, more and more compilers are doing away with it).
and among the ones that do have <iostream.h>, the semantics vary. with some compilers, <iostream.h> provides standard iostreams with using-declarations added. there are others where <iostream.h> gives "classic" iostreams instead of standard iostreams, and these may not interoperate with the rest of the standard library.
if you change the #include for the header to follow the C++ standard:
#include <iostream>
using std::cout ;
using std::cin ;
using std::endl ;
// etc
// or alternatively
// using namespace std ;
you should be able to compile and run your program with any
compiler that claims even modest conformance to the international standard for C++.