After having learned DM fairly well, I decided to learn C++ and see where it takes me. I'm working on switch statements right now and have the following question:
Can I test a condition under case rather than a single value? For example:
something like...
switch ( x ) {
case x < 7:
cout << "Too few!" << endl;
break;
}
...instead of...
switch ( x ) {
case 7:
cout << "Too few!" << endl;
break;
}
Is this possible? I'd really appreciate your suggestions. =D