C++ Equivalent to VB Select
For simple cases, VB's Select construct can be converted to the C++ switch construct. However, if any of the Case statements include range or non-constant expressions, then the equivalent is an if/else block.
For example, the following VB code:
Select Case x
Case 1 To 3
...
Case Is < 10, Is > 20, Is = 15
...
End Select
Has the following C++ equivalent:
if (x >= 1 && x <= 3)
...
else if ((x < 10) || (x > 20) || (x == 15))
...
If you need to convert from VB to C++ and you are depending on the results being reliable and accurate, then you will want to have VB to C++ Converter, the best VB to C++ converter, at your fingertips.