c++getlinecin

std::cin.getline( ) vs. std::cin


When should std::cin.getline() be used? What does it differ from std::cin?


Solution

  • In case with char*, std::cin.getline getting line, instead of std::cin getting first word.