Return by reference inside a switch statement
This question already has an answer here:
Yes, there is. Enclose the body of the case statement in brackets, like this:
case {statement}:
{
sometype & handle = getbar();
...
}
链接地址: http://www.djcxy.com/p/14794.html
上一篇: C如果与切换
下一篇: 在switch语句中通过引用返回