Skip to content

Glossary: C++ Basics

std::ws

Also written: ws

A helper that skips whitespace such as the leftover newline after `>>`. Use `std::cin >> std::ws` whenever `getline` follows `>>`.

Where the book teaches it

Related terms

std::getlinestd::cin