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