Possible Duplicate:
Difference between iostream and iostream.h
My professor said that the following:
#include <iostream.h>
is the same as:
#include <iostream>
using namespace std;
I’m a bit confused. What is the difference between iostream and iostream.h?
iostream.his not part of the standard C++ library whereasiostreamis. Names iniostream.hare not in thestdnamespace, whereas those iniostreamare. By issuing the directiveusing namespace stdafter includingiostream, all names defined there (and in any other standard library includes) are brought into the global namespace. That is usually not a good thing, but it does provide some level of equivalence between the standard and non- or pre-standard versions.As far as claiming that they are “the same” as each other, this is unlikely.
iostreamadheres to the standard, and will have evolved w.r.t.iostream.h. This is particularly true if you consider the C++11 standard.