Technology Software

How to Jump Out of a Void Function in C++

    • 1). Right-click the CPP file that contains your void function. Click "Open With" and then click the C++ editor in the list of programs.

    • 2). Place the cursor in the void function. If you have a condition statement, you can place the "return" keyword within the condition to stop the void function if the condition is met. Otherwise, place the curse at the end of the function.

    • 3). Type the following code in the editor:

      return;

Leave a reply