title: vector <pair<int,int>>v(size); showing 0 as values when printed
body: <p>C++: <code>vector&lt;pair&lt;int,int&gt;&gt;v(size);</code> showing 0 as values when I am trying to print out the values, but when the vector size is not declared it is showing correct output? Why so?
  For example: </p>
  
  <pre><code>int x;
  cin&gt;&gt;x;
  vector&lt;pair&lt;int,int&gt;&gt;v(x); //Size declared.
  for(int i=0;i&lt;x;i++){
      int p,q;
      cin&gt;&gt;p&gt;&gt;q;
      v.push_back(make_pair(p,q));
  }
  </code></pre>
  
  <p>But when I am trying to print the values, it is printing 0 only. </p>
  
  <pre><code>I/P-&gt;  
  3
  1 2
  3 4
  5 6
  O/P-&gt;
  0 0
  0 0
  0 0
  </code></pre>
  
  <p>But when I don't declare the size of the vector it prints the output without any error, why is that?
  i.e </p>
  
  <pre><code>int x;
  cin&gt;&gt;x;
  vector&lt;pair&lt;int,int&gt;&gt;v; //Size is not declared.
  for(int i=0;i&lt;x;i++){
      int p,q;
      cin&gt;&gt;p&gt;&gt;q;
      v.push_back(make_pair(p,q));
  }
  I/P-&gt;  
  3
  1 2
  3 4
  5 6
  O/P-&gt; 
  1 2
  3 4
  5 6
  </code></pre>
  
  <p>It shows the correct output. Why is that?</p>