How to read in individual characters and output when two-character-sequnce is inputted? using while loop and C++ : I am in the works of trying to write a program that reads in *individual* characters and prompts the user when the two-character-sequence 'cs' that the door has opened. I'm stuck on where or how to store the current value and output the response after the string has completely been read.

**Data reading in from notepad:**

cs

imacsmajor

css

ab

decds

**Desired output:**

cs      open door

imacsmajor open door

css open door

ab closed door

decds closed door

[code written so far][1]


  [1]: https://i.stack.imgur.com/fjiJq.png

