title: Entering 2 values until a specific character key is pressed in C++?
body: <p>I have a C++ program, where I want to read 2 values until a specific character key is pressed - in this case '0'. I would like to ask how can I accomplish that in C++ without complicating the program too much?
  Thanks in advance.</p>
  
  <p>Pseudocode:</p>
  
  <pre><code>    #include &lt;iostream&gt;
  
      using namespace std;
  
      int a,b;
      int main(){
          while ('0' is not pressed) {
              cin&gt;&gt;a&gt;&gt;b;
          }
      }
  </code></pre>