You are here

Syntax

6 February, 2015 - 17:05

The syntax for the do while control structure within the C++ programming language is:

do   { 
  statement;   statement; 
  statement;   statement; // This statement updates the flag;   } while (expression); 

Note:
The test expression is within the parentheses, but this is not a function call. The parentheses are part of the control structure. Additionally, there is a semicolon after the parenthesis following the expression.