Replace include <iostream> with istream, ostream and/or iosfwd as appropriate. Remove using namespace std and using std::foo from header files.