explain the function getline
Answers
Answered by
2
So Basically in C++ we need to enter multiple strings in one go, like inputting a line or a paragraph.
The std :: cin does not facilitates this option for inputting multiple Strings in one Go.
So, C++ have getline() function to achieve this result.
In the older version of c++ when string (derived datatypes ) weren’t introduced, at that time it takes the input as string in the form of array of characters
The std :: cin does not facilitates this option for inputting multiple Strings in one Go.
So, C++ have getline() function to achieve this result.
In the older version of c++ when string (derived datatypes ) weren’t introduced, at that time it takes the input as string in the form of array of characters
Similar questions