俳優または映画のタイトルを選択したときに while ループが存在する while ループを作成しようとしています。しかし、何らかの理由で機能しないため、while (selecton)
行にエラーがあることがわかります。誰にもアイデアがありますか?
string selection;
while ( selection )
{
cin >> selection;
if ( selection == "actress" )
{
cout << "hey" << endl;
break;
}
else if ( selection == "movie title" )
{
cout << "bye";
break;
}
else
{
cout << "Please choose a selection";
}
}