getline and cin.getline code example Example: getline vs cin.getline getline(cin, variable_name, '\n');