title: How to use pass ifstream input in a function and output? C++
body: <p>For example:</p>
  
  <pre><code>ifstream input;
  input.open("file.txt");
  translateStream(input, cout);
  input.close();
  </code></pre>
  
  <p>How to write function translateStream?
  <code>void translateStream(XXXX input, YYYY output)</code>?
  What are the types for input and output?</p>
  
  <p>Thanks</p>