Why is it this doesn't work?
Thanks in advanced!Code:int func()
{
return 1;
}
//...
switch (input)
{
case func():
//...
break;
}
Printable View
Why is it this doesn't work?
Thanks in advanced!Code:int func()
{
return 1;
}
//...
switch (input)
{
case func():
//...
break;
}
Because this is wrong !
case takes only some constants (int,char) :)