Using cin.get() again

why we are using this function at the starting of the loop as we are mentioning it in the while loop ?

Hi @Raghavsingla522, we are extracting every character one by one using cin.get(). So if we are given
NWWEWS we are extracting N first then W ,then W and so on till we can;t extract any new character and for that we used while loop and calling cin.get() inside it

I hope I’ve cleared your doubt. I ask you to please rate your experience here
Your feedback is very important. It helps us improve our platform and hence provide you
the learning experience you deserve.

On the off chance, you still have some questions or not find the answers satisfactory, you may reopen
the doubt.