How do you exit from a void function in C++?

How can you prematurely exit from a function without returning a value if it is a void function? I have a void method that needs to not execute its code if a certain condition is true. I really don’t want to have to change the method to actually return a value.

Best Answer

Leave a Comment