
Available under Creative Commons-ShareAlike 4.0 International License.
The following shows the use of the sequence operator to separate the multiple initializations and multiple updates. This is not available in most languages, thus is more unique to the C++ programming language.
Example 15.3: C++ source code: for with multiple initializations and updates
for(x =0, y=l0; x < l0; x++, y--) { cout « x*y « endl; }
- 瀏覽次數:1359