When I try to compile my program the compiler complains about this line in a .h file that I #included.
ostream & Print (ostream & stream);
How can this be fixed?
If you #include <ostream>
, ostream
will be defined in the std
namespace:
#include <ostream>
// ...
std::ostream & Print (std::ostream & stream);
Use 'using' if you don't want to pull the whole std namespace, eg :
#include <iosfwd>
using std::ostream;
If you love us? You can donate to us via Paypal or buy me a coffee so we can maintain and grow! Thank you!
Donate Us With