title: Switch unintentional loop
body: <p>So when I select lets say option 1 first. So Active Directory and then select option 3 Add user to group. It asks for the username. So that is okay. But when I enter the user name it then loops over and over displaying the menu instead of prompting for the group to add them to. I haven't touched C++ in ages and I never got intensely good. But just looking for some advice. Maybe even a better menu system.</p>
  
  <pre><code>void ActiveDirectoryMenu()
  {
      do
      {
          cout &lt;&lt; "\n1. Active Directory clean up\n2. Copy over use permissions";
          cout &lt;&lt; "\n3. Add user to group\n4. Reset user password\n5. Enable - Disable account\n";
          cin &gt;&gt; tempChoice;
  
          switch (tempChoice) {
              case 1:
                  ActiveDirectoryCleanUp();
                  break;
              case 2:
                  cout &lt;&lt; "Execute copy";
                  break;
              case 3:
                  ActiveDirectoryAddGroup();
                  break;
              case 4:
                  cout &lt;&lt; "Specify username: ";
                  cin &gt;&gt; tempUser;
                  cout &lt;&lt; "\nDefault password: ";
                  cin &gt;&gt; temp;
                  break;
              case 5:
                  cout &lt;&lt; "Specify username: ";
                  cin &gt;&gt; tempUser;
                  cout &lt;&lt; "\n1. Enable\n2. Disable\n";
                  cin &gt;&gt; tempChoice;
          }
      }
      while (tempChoice != 6);
  }
  void ExchangeMenu()
  {
  
  }
  void ActiveDirectoryCleanUp()
  {
      cout &lt;&lt; "Executing AD clean up....";
  }
  void ActiveDirectoryAddGroup()
  {
      cout &lt;&lt; "Specify user: ";
      cin &gt;&gt; tempUser;
  
      if (tempUser == "") {
          cout &lt;&lt; "\nSpecify group: ";
          cin &gt;&gt; tempGroup;
      } else {
          cout &lt;&lt; "Please enter valid user" &lt;&lt; endl;
      }
  }
  </code></pre>