<fstream> does
not define std::cout,
std::cin etc.
In earlier versions of the standard,
<fstream.h>,
<ostream.h>
and <istream.h>
used to define
cout, cin and so on. Because
of the templatized iostreams in libstdc++-v3, you need to include
<iostream>
explicitly to define these.
