return statement
Aus cppreference.com
![]() |
This page has been machine-translated from the English version of the wiki using Google Translate.
The translation may contain errors and awkward wording. Hover over text to see the original version. You can help to fix errors and improve the translation. For instructions click here. |
Beendet aktuelle Funktion und kehrt angegebenen Wert an den Aufrufer Funktion .
Original:
Terminates current function and returns specified value to the caller function.
The text has been machine-translated via Google Translate.
You can help to correct and verify the translation. Click here for instructions.
You can help to correct and verify the translation. Click here for instructions.
Inhaltsverzeichnis |
[Bearbeiten] Syntax
return expression
|
(1) | ||||||||
return
|
(2) | ||||||||
[Bearbeiten] Erklärung
Die erste Version wertet die expression, beendet die aktuelle Funktion und gibt das Ergebnis der an den Anrufer expression Funktion. Die daraus resultierende Art der expression müssen konvertierbar sein Rückgabetyp funktionieren .
Original:
The first version evaluates the expression, terminates the current function and returns the result of the expression to the caller function. The resulting type of the expression must be convertible to function return type.
The text has been machine-translated via Google Translate.
You can help to correct and verify the translation. Click here for instructions.
You can help to correct and verify the translation. Click here for instructions.
Die zweite Version beendet die aktuelle Funktion. Nur gültig, wenn die Funktion Rückgabetyp ist void .
Original:
The second version terminates the current function. Only valid if the function return type is void.
The text has been machine-translated via Google Translate.
You can help to correct and verify the translation. Click here for instructions.
You can help to correct and verify the translation. Click here for instructions.