C++ 23 · Input, exceptions and threads

Read a line from the keyboard

Read a whole line, including spaces.

std::string name;
std::getline(std::cin, name);

Official C++ 23 documentation

More input, exceptions and threads commands

All input, exceptions and threads commands · C++ 23 cheatsheet

Was this page helpful?