+ 3

About "switch" and "if" functions in C++.

Can I use "switch" function inside if-statement in C++?

15th Jul 2017, 1:31 PM
Káfefe
Káfefe - avatar
4 Antworten
+ 9
if (isNum(num)) { switch (num) { case 1: // do something // more cases } } // valid.
15th Jul 2017, 1:38 PM
Hatsy Rei
Hatsy Rei - avatar
+ 6
Yes!
15th Jul 2017, 1:34 PM
Nomeh Uchenna Gabriel
Nomeh Uchenna Gabriel - avatar
+ 2
Thank You for reply! ^_^ Helped me so much. >~<
15th Jul 2017, 2:03 PM
Káfefe
Káfefe - avatar
+ 1
have are you
15th Jul 2017, 3:44 PM
rizwanullah