I'm starting to grasp c++ but there is one thing that confuses me and it's using break and select case. I know how to do this but what I would like to understand is why this certain operation happens.
Say if i have
switch (Tasty)
{
case true:
cout << "yum" << endl;
break;
case false:
cout << "erch" << endl;
break;
}
Now that does it correctly and prints out what I want, but if I do
switch (Tasty)
{
case true:
cout << "yum" << endl;
case false:
cout << "erch" << endl;
}
Why does it print both "yum" and "erch"?