Stuck in do while loop

I'm perplexed by this do while loop I'm working with. If the string logic is satisfied then it works, but the loop seems to go on infinitely as soon as the string is typed incorrectly.
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
bool b = true;
	
	for (int i = hours; i > 0; i-=1)
	{
		b = true;
		do
		{
			string workType;
			cout << "Type: 'I hate this.' to advance an hour. You have " << i << " hour(s) remaining.\n";
			cin.get();
			getline(cin, workType);
			if (workType == "I hate this.")
				b = false;
			else if (workType != "I hate this.")
			{
				cout << "You screwed up, try again.\n";
				cin.get();
			}
				
		} while (b == true);
		energy -= 10;
		money += 10;
Any insight as to why the do while seems to go on infinitely after an incorrect string would be greatly appreciated.
Try to remove line 17.
No, that didn't work. it's weird how it just no longer accepts "I hate this." as the correct input once you enter something other than that.
Ah, try to write II hate this. If this will work, remove line 10 too.
try to remove the cin.get() at line 10 and line 17.
Topic archived. No new replies allowed.