Question: what is the difference between cin and getline when used to get strings from the user?
Answer: The main difference between getline and cin is that getline is a standard library function in the string header file while cin is an instance of istream class. ... Programmers can use these functions in their programs. getline is a function in the string header file while cin is an object defined in the istream class.