String input methods

difference between cin.getline() and getline()

Hi @Saleem1
cin.getline is a member of ostream, and you use it with C-style strings (ie. arrays of char terminated by a null character). getline is an independent function declared in for use with the std::string class.

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.