getline examples Example: c++ reading string Click to copy#include <iostream> #include <string> string str; getline(cin, str); //str contains line