title: "Jump to case label" error when using vectors inside switch statement.
body: <p>This is the code, where I get several errors, when I add the other case or a deafult. I can't find any basic error like a missing semicolon or so, and the code works properly when I have only one case. I searched trough switch tutorials, but I didn't find anything about vectors and switch statements mixed is a problem.   </p>
  
  <pre><code>int main()
  {
  int r; 
  while (cin &gt;&gt; r)
  {
      switch (r) 
      {
         case 3:
      int y = 0;
      cout &lt;&lt; "Please enter some numbers, and I will put them in order." &lt;&lt; endl; 
      vector&lt;int&gt; nums;
      int x;
      while(cin &gt;&gt; x)
      {
          nums.push_back(x);
          y++;
      }
      sort(nums.begin(), nums.end());
      int z = 0;
      while(z &lt; y)
      {
          cout &lt;&lt; nums[z] &lt;&lt; ", ";
          z++;
          if(z &gt; 23)
              cout &lt;&lt; "\n" &lt;&lt; "User... What r u doin... User... STAHP!" &lt;&lt; endl;
      }
      cout &lt;&lt; "\n" &lt;&lt; "You entered "&lt;&lt; nums.size() &lt;&lt; " numbers." &lt;&lt; endl;
      cout &lt;&lt; "Here you go!" &lt;&lt; endl;
      break;
  
      //In the following line I get the "jump to case label" error. 
      //I use Dev C++ software.
  
         case 4:
      cout &lt;&lt; "it works!!!" &lt;&lt; endl;
      break; 
      }
  }
  system ("PAUSE");
  return 0;
  }
  </code></pre>
  
  <p>What am I missing?</p>