title: newline from user input without pressing enter
body: <p>First of all, I should mention that I found several closely related questions. Eg <a href="https://stackoverflow.com/questions/10782682/will-cin-recognize-n-typed-in-from-keyboard-as-a-newline-character">here</a> and <a href="https://stackoverflow.com/questions/2508796/c-printf-newline-n-from-commandline-argument/2508814#2508814">here</a>. However, neither do I want to use <code>printf</code> nor do I want to use <code>\n</code> (because I know already that it does not work).</p>
  
  <p><strong>Is it possible for the user to enter a newline, probably an escape sequence, without hitting enter?</strong></p>
  
  <p>As an example:</p>
  
  <pre><code>#include &lt;iostream&gt;
  #include &lt;string&gt;
  
  int main () {
      std::string a,b;
      std::cin &gt;&gt; a;
      std::cin &gt;&gt; b;
      std::cout &lt;&lt; a &lt;&lt; "\n" &lt;&lt; b;
  }
  </code></pre>
  
  <p>Is it possible for a user to provide a single line of input </p>
  
  <pre><code>hello ??? world 
  </code></pre>
  
  <p>such that the above prints </p>
  
  <pre><code>hello
  world
  </code></pre>
  
  <p>?</p>