title: Create a print function that takes an ostream as an argument and writes to that stream
body: <p>Im currently anwsering exercise questions concerning operator overloading in C++. I have a question:</p>
  
  <p>Create a simple class containing an int and overload the operator+ as a member function. Also provide a print( ) member function that takes an ostream&amp; as an argument and prints to that ostream&amp;. Test your class to show that it works correctly.</p>
  
  <p>I can create the class and write the operator+ function alright but I really dont understand the second part of the question. So far in my study of c++ I havent really come across ostream's and as such am not sure if its possible to explicitly create such a stream. I have tried using:</p>
  
  <p>std::ostream o;</p>
  
  <p>However this produces an error. Could someone please enlighten me on how I should create this function please?</p>