I want to return nothing inside a function returning void. How would I do that?
Asked
Active
Viewed 635 times
2 Answers
4
You can do one of two things:
- Structure the flow of the code so that there is no need for a return statement.
- Place
return;
statements where you want the function to return control to the caller.
EDIT: To clarify, return;
is a statement that returns control to the caller without yielding a value.
That's basically it.

LBushkin
- 129,300
- 32
- 216
- 265