title: Why won't this do-while loop break out once the condition is not met?
body: <p>what's up, I've got another issue with this huge project I'm working on.</p>
  
  <p>The project is for school, but this isn't the entire piece. For more information on the project you can look <a href="http://www.cs.tufts.edu/comp/11/projects/comp11f11p1.pdf" rel="nofollow">here</a>.</p>
  
  <p>So I have to take input from the user in the following format:</p>
  
  <p><code>p 11:45 12:15</code></p>
  
  <p>It will always start with either a <code>p</code> or an <code>s</code> and will have two times during which there is a call on a phone. The big idea is to compare cell phone plans taking into account daytime minutes, night minutes, etc. </p>
  
  <p>Right now I'm having trouble taking the input. Every time I run the program, it doesn't care if I start the input with an <code>s</code> and just keeps waiting for more data. Frustrating part is that it was working not too long ago. </p>
  
  <p>Here's my code:</p>
  
  <pre><code>string c;
  string end = "s";
  string start = "p";
  int temp_start_hour;
  int temp_start_min;
  int temp_end_hour;
  int temp_end_min;
  char colon;
  
  do {
      cin &gt;&gt; c;
      cout &lt;&lt; c &lt;&lt; endl;
      if (c != start &amp;&amp; c != end)
      {
          cout &lt;&lt; "ERROR IN INPUT" &lt;&lt; endl;
          return 1;
      }
  
      if (c != end)
      {
          cin &gt;&gt; temp_start_hour &gt;&gt; colon &gt;&gt; temp_start_min;
          cin &gt;&gt; temp_end_hour &gt;&gt; colon &gt;&gt; temp_end_min;
  
          begin_hours[i] = temp_start_hour;
          begin_min[i] = temp_start_min;
          end_hours[i] = temp_end_hour;
          end_min[i] = temp_end_min;
      }
      i++;
  } while (c != end);
  </code></pre>