title: Reverse function defined by me is not printing the result
body: <p>In int main() function if I use declare vector b is not printing the result. If I erase the vector b then the expected result is printed. Why the presence of vector b is obstructing the printing of reverse function?</p>
  
  <p>I erase the vector b then the expected result is printed. The presence of vector b is obstructing the printing of reverse function</p>
  
  <pre><code>#include &lt;iostream&gt;
  #include &lt;vector&gt;
  
  using namespace std;
  
  int reverse(vector&lt;int&gt; a, int s, int e) {
      while(s &lt; e) {
          int temp = a[s];
          a[s] = a[e - 1];
          a[e - 1] = temp;
          s++;
          e--;
      }
      for(int i = 0; i &lt; a.size(); i++) {
          cout &lt;&lt; a[i] &lt;&lt; " ";
      }
  }
  
  int main() {
      vector&lt;int&gt; a;
  
      a.push_back(1);
      a.push_back(3);
      a.push_back(5);
      a.push_back(7);
      a.push_back(9);
  
      vector&lt;vector&lt;int&gt;&gt; b;
      b[0].push_back(0);
      b[0].push_back(2);
      b[1].push_back(0);
      b[1].push_back(3);
  
      reverse(a, 0, 5);
  }
  </code></pre>
  
  <p>Expected result: <code>9 7 5 3 1</code><br>
  No error message but the expected result is not printed.</p>