getline
getline is a line-oriented input facility used to read an entire line from a stream into a dynamically allocated buffer. In C, getline refers to a POSIX/GNU extension that may not be available on all platforms. In C++, the standard library provides a separate function, std::getline, used to extract a line from a stream into a string.
In C, the POSIX getline function has the prototype ssize_t getline(char **lineptr, size_t *n, FILE *stream). It
In C++, std::getline reads from an input stream into a std::string (or another character sequence) until the
Portability and usage notes: getline is not part of ISO C, so portable C code often uses