Sir, as you said that cin cannot be used with string class and you used the getline function to take input i.e. array of string
but when i used cin to take input it worked for me.
So can you please explain me why it happened? and also why cin cannot be used to take input for string class?
Use of cin to take input for string class
@SiddeshPawar
hello siddesh,
try reading this string using cin
string -> abcd def ghi
tell me what ur are getting using cin?
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.