title: error in getline input in c++
body: <p>Hi guys i am facing an unknown error while taking input from getline.My purpose is to take a number and two strings as input from the user and print the first string.Here is the problem code</p>
  
  <pre><code>#include &lt;iostream&gt;
  using namespace std;
  
  int main() {
    int t;
    cin&gt;&gt;t;
    while(t--)
     {    string s,p;
          getline(cin,s);
          getline(cin,p);
          cout&lt;&lt;s;
     }
    return 0;
    }
  </code></pre>
  
  <p>Now when i give input like:</p>
  
  <pre><code>1
  abababa abb
  b
  </code></pre>
  
  <p>it doesn’t print anything.Why is it happening?</p>