Answers for "what does the getline function do in c++"

C++
5

getline cpp

//getline allows for multi word input including spaces ex. "Jim Barens"
#include <iostream>
#include <string>

int main() 
{
  string namePerson{};     // creating string
  getline(cin, namePerson);// using getline for user input
  std::cout << namePerson; // output string namePerson
}
Posted by: Guest on October-20-2020
0

how to use getline function inc

size_t getline(char **lineptr, size_t *n, FILE *stream);Copy
Posted by: Guest on February-24-2021

Code answers related to "what does the getline function do in c++"

Browse Popular Code Answers by Language