I've had a look at your code and I've noticed these two lines:
id = id.substr(2,8);
Just out of curiousity, why are you 'clipping' these strings?
string id_line = line.substr(1,8);
This is a minor note but instead of doing this:
it may be better if you did something like this:
Also, in your if statement you set the value of 'cleared' to true and then print out a statement based on the value of 'cleared'. Why not just print the statement from your if statement?
if( !id.compare(id_line) )
Edit: I just realised that I was reading rodrigorules's code instead, but your program works in a very similar way.
Why do you print out a statement saying a patron has towel service in the while loop but then you have this if statement afterwards which seems a bit out of place. The only way this if statement will be true is if no one has towel service because in your while loop you change the value of x to '1' if someone has it, but you don't take it back down afterwards, and even if you did set it to '0' when someone didn't have it, it wouldn't print out the message because your if statement is after the loop.
Also, change this line:
cout<<"Patron does not have towel service"<<endl;
I'm also not sure what the point of this is:
Why do you initially set them to some stuff if you don't do anything with them? It really makes very little difference to the program, so maybe I'm just being pedantic. Are they relics from your initial version of the code?