title: How can to print the input without storing it in c++?
body: <p>I want to deal with the input stream without storing it in the memory. Currently, what I'm doing is</p>
  
  <pre><code>String mem;
  cin &gt;&gt; mem;
  cout &lt;&lt; mem &lt;&lt; endl;
  </code></pre>
  
  <p>But, something like</p>
  
  <pre><code>cout &lt;&lt; cin;
  </code></pre>
  
  <p>is not possible. I get</p>
  
  <pre><code>error: ambiguous overload for ‘operator&gt;&gt;’ (operand types are ‘std::istream {aka std::basic_istream&lt;char&gt;}’ and ‘std::ostream {aka std::basic_ostream&lt;char&gt;}’)
       cin &gt;&gt; cout;
  </code></pre>
  
  <p>In Python 2.7, I can do </p>
  
  <pre><code>print input()
  </code></pre>
  
  <p>Is there any way to do this in C/C++ too?</p>