What is the difference between
#include <iostream.h>
and
#include <iostream>
?
Before C++ was even standardised, the I/O library was developed as <iostream.h>
. However, that header has never been a standard C++ header. Some older compilers continued to distribute the <iostream>
header also as <iostream.h>
. Use <iostream>
because it is guaranteed by the standard to exist.
It's worth noting that the only standard headers that end with .h
are the C standard library headers. All C++ standard library headers do not end with .h
.