0
Call a Function when checking case in switch statement
Is it possible to call a function during case check in switch statement!? bool Function (); int main () { switch (false) { case "Function ()" : printf ("\n Function Called!"); break; default : printf ("\n "); } }
4 Answers
+ 3
Edited: Yes, H. Ahmadian. That's what I meant. You mighr want to check this out:
https://stackoverflow.com/a/14069771
+ 1
As I recall (cmiiw), const char* isn't supported as an evaluation subject in `switch` cases (C language tagged).
+ 1
Kevin â
I didn't get it!!! You mean i mustn't surround function call with quotes!? Because i did so, if you see the code more careful
0
No one have any idea!!? đ