Understanding Getline() Function in C++

Understanding Getline() Function in C++

cin is an object used to get input from the user, but it does not allow multi-line input. To accept multi-line input, we use the getline() function. The getline() function is a predefined function defined in the <string.h> header file, used to accept a line or a string from the input stream until a delimiter … Read more