When I try to compile my program, the compiler complains about this line in the .h file that I included #.
ostream & Print (ostream & stream);
How can this be fixed?
If you do #include <ostream>, ostreamit is defined in a namespace std:
#include <ostream>
ostream
std
#include <ostream> // ... std::ostream & Print (std::ostream & stream);
Use 'using' if you do not want to stretch the entire std namespace, for example:
#include <iosfwd> using std::ostream;
:
#include <iosfwd> using namespace std;