Go back to Richel Bilderbeek's homepage.

Go back to Richel Bilderbeek's C++ page.

 

 

 

 

 

(C++) std::getline

 

std::getline is an STL user I/O function to read a line of input.

 

#include <iostream>

int main()
{
  std::string s;
  std::getline(std::cin,s);
  std::cout << s << '\n';
}

 

 

 

 

 

Go back to Richel Bilderbeek's C++ page.

Go back to Richel Bilderbeek's homepage.

 

Valid XHTML 1.0 Strict