I am currently at work and have some time to kill so i thought I would ask a question about strings and booleans I was going to try out when I get home tonight.
So I used to dabble in C++ a number of years ago as I enjoy it, anyway I have had some time lately and I am trying to pick things back up. I was typing something up last night and I would like to implement a bool into it that’s determined by the cin of a string. So could someone be so kind to tell me if the following would work;
int main()
...
if (staggered == "yes" || staggered == "Yes") {
/*OR
declare stag on the same line it is first used*/
bool stag = (staggered == "yes" || staggered == "Yes");