getline (cin string) tidak berfungsi

//Using cin.clear() to ignore any trailing newline character
string str;
cin.clear();
getline(cin, str);
UBoiii