std::cin.getline( ) vs. std::cin
When should std::cin.getline() be used? What does it differ from std::cin ? In case with char*, std::cin.getline getting line, instead of std::cin getting first word. MSalters Let's take std::cin.getline() apart. First, there's std:: . This is the namespace in which the standard library lives. It has hundreds of types, functions and objects. std::cin is such an object. It's the standard character input object, defined in <iostream> . It has some methods of its own, but you can also use it with many free functions. Most of these methods and functions are ways to get one or more characters from