ok I want to compare a string based on the input
so lets say I have
string bookType = "";
cout << "Enter type of book:(enter either paperback or hardback):";
getline(cin,boo kType);
//what is the best way to do the following:
if bookType = "paperback"
cout << "you chose paperback"
else
cout << "you chose hardback"
Thanks,
Tim
so lets say I have
string bookType = "";
cout << "Enter type of book:(enter either paperback or hardback):";
getline(cin,boo kType);
//what is the best way to do the following:
if bookType = "paperback"
cout << "you chose paperback"
else
cout << "you chose hardback"
Thanks,
Tim
Comment