Question: what is the difference between using cin and cin.getline() function?
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.