User Tools

Site Tools


Sidebar

Programming Reference/Librarys

Question & Answer

Q&A is closed







cpp:control_structures:goto
click
to support this page (eg 0,42 € or so) Thanks.

goto

  Syntax: 
  goto Jumppoint;
  
  Jumppoint: e.g. instruction function

cpp Sourcecode Example

#include <iostream> /* including standard library */
 
using namespace std;
int main( void ){
 
int i;
 
for (i=0;i<=99;i++) {
    if (i==42) {
        goto jump_point;
    }
}
 
jump_point: cout << "Found the answer " << i << " ... is this right ?" << endl;
 
return 0;
}
  output
  Found the answer 42 ... is this right ?
advertising
cpp/control_structures/goto.txt · Last modified: 2012/10/12 02:12 (external edit)

Impressum