c++如何退出一个void函数

c++如何退出一个void函数

c++退出一个void函数的方法是:使用返回语句!

return

if (condition) return

您不需要(且不能)指定任何值, code> void 。