August 2012
Intermediate to advanced
976 pages
30h 17m
English
for StatementThe new standard introduced a simpler for statement that can be used to iterate through the elements of a container or other sequence. The syntactic form of the range for statement is:
for (declaration : expression) statement
expression must represent a sequence, such as a braced initializer list (§ 3.3.1, p. 98), an array (§ 3.5, p. 113), or an object of a type such as vector or string that has begin and end members that return iterators (§ 3.4, p. 106).
declaration defines a variable. It must be possible to convert ...
Read now
Unlock full access