Flow-control structures

From Rosetta Code
Revision as of 16:04, 25 January 2007 by MikeMol (talk | contribs) (Added C++)
(diff) ← Older revision | Latest revision (diff) | Newer revision → (diff)

C++

Run-Time Control Structures

goto

Compiler: GCC 3.3.4

#include <iostream> 

int main()
{
 LOOP:
  std::cout << "Hello, World!\n";
 goto LOOP;
}

Note that "goto" may also be used in conjunction with other forms of branching.