title: The "continue" statement doesnt transfer control to the starting of the loop
body: <p>I'm a beginner when it comes to programming and recently my professor asked me to make a program for the parking lot. The problem I'm facing is that when my compiler encounters a <code>continue</code> statement inside my <code>switch</code> statement, it doesn't transfer the control to the starting of the loop where the user is required to choose an option.</p>
  <p>Here's my code:-</p>
  <pre><code>#include &lt;iostream&gt;
  #include &lt;string.h&gt;
  #include &lt;fstream&gt;
  #include &lt;vector&gt;
  
  int rick_amnt = 100, car_amnt = 200, busses_amnt = 300;
  int car_parked = 0;
  
  using namespace std;
  
  int main()
  {
      int type, menu;
      char confirm;
  
      do {
          cout &lt;&lt; &quot;-------MENU--------\n&quot;;
          cout &lt;&lt; &quot;01 : Parking tickets&quot; &lt;&lt; endl;
          cout &lt;&lt; &quot;02. Parked cars&quot; &lt;&lt; endl;
  
          cout &lt;&lt; &quot;Choose an option : &quot;;
          cin &gt;&gt; menu;
  
          system(&quot;cls&quot;);
  
          if (menu == 1) {
  
              cout &lt;&lt; &quot;01: Rickshaw\n02: Car\n03: Bus\n&quot;;
              cout &lt;&lt; &quot;what is your car type : &quot;;
              cin &gt;&gt; type;
  
              switch (type) {
              case 1: {
                  cout &lt;&lt; &quot;Rickshaw parking ticket = &quot; &lt;&lt; rick_amnt &lt;&lt; endl;
                  cout &lt;&lt; &quot;do you wish to park your Rickshaw?(y/n) &quot;;
                  cin &gt;&gt; confirm;
                  if (confirm == 'y') {
                      cout &lt;&lt; &quot;Successfull payment!&quot; &lt;&lt; endl;
                      car_parked++;
                      break;
                  }
                  else {
                      cout &lt;&lt; &quot;Car parking declined&quot; &lt;&lt; endl;
                      continue;
                  }
              }
  
              case 2: {
                  cout &lt;&lt; &quot;Car parking ticket = &quot; &lt;&lt; car_amnt &lt;&lt; endl;
                  cout &lt;&lt; &quot;do you wish to park your Car? (y/n) &quot;;
                  cin &gt;&gt; confirm;
                  if (confirm == 'y') {
                      cout &lt;&lt; &quot;Successfull payment!&quot; &lt;&lt; endl;
                      car_parked++;
                      break;
                  }
                  else {
                      cout &lt;&lt; &quot;Car parking declined&quot; &lt;&lt; endl;
                      continue;
                  }
              }
  
              case 3: {
                  cout &lt;&lt; &quot;Buses parking ticket = &quot; &lt;&lt; busses_amnt &lt;&lt; endl;
                  cout &lt;&lt; &quot;do you wish to park your Bus?(y/n) &quot;;
                  cin &gt;&gt; confirm;
                  if (confirm == 'y') {
                      cout &lt;&lt; &quot;Successful payment!&quot; &lt;&lt; endl;
                      car_parked++;
                      break;
                  }
                  else {
                      cout &lt;&lt; &quot;Car parking declined&quot; &lt;&lt; endl;
                      continue;
                  }
              }
  
              default:
                  cout &lt;&lt; &quot;invalid identity&quot; &lt;&lt; endl;
              }
          }
  
          else if (menu == 2) {
              cout &lt;&lt; &quot;Parked cars = &quot; &lt;&lt; car_parked &lt;&lt; endl;
          }
          else
              cout &lt;&lt; &quot;Invalid entry&quot; &lt;&lt; endl;
  
          cout &lt;&lt; &quot;Ty again?(y/n) &quot;;
          cin &gt;&gt; confirm;
          system(&quot;cls&quot;);
      } while (confirm == 'y');
  
      cout &lt;&lt; &quot;Successfully exited the parking lot.\nHave a nice day!&quot; &lt;&lt; endl;
  
      return 0;
  }
  </code></pre>
  <hr />
  <p>I want my code to function in a way that if the user inputs any other character besides 'y' when asked to confirm parking, the parking is declined and control is transferred to the beginning of the loop where user should choose an option again. But, when I input any other character, my code just ends all the lines of code and exits the loop. Isn't the <code>continue</code> statement supposed to transfer the control towards the beginning of the loop?</p>