title: C++ initializing a variable and assigning with std::cin
body: <p>This might be a bit stupid question, but I have failed to find any kind of answer for it anywhere else. I am writing codes in C++ (atleast 11 I think) and have to use:  </p>
  
  <pre><code>int N;
  cin &gt;&gt; N;  
  </code></pre>
  
  <p>My question is if there is an elegant way to write it as a one line of command? I already know that I can just remove the linebreaks and just put them on one line, but that wouldn't let me use it in a oneliner loop:  </p>
  
  <pre><code>for(int i=0; i&lt;10; i++) myVector.push_back();
  </code></pre>