goto statement

From cppreference.com

Transfers control to the desired location

Used when it is otherwise impossible to transfer control to the desired location using conventional constructs.

Contents

[edit] Syntax

goto label

[edit] Explanation

The goto statement transfers control to the location, specified by label. The goto statement must be in the same function as the label it is referring. If goto statement transfers control backwards, all objects, that are not yet initialized at the label are destructed. It is not allowed to transfer control forwards if doing so would skip initialization of an object.

[edit] Keywords

goto

[edit] Example