C++ keyword: do - cppreference.com (original) (raw)
[edit] Usage
- do-while loop: as the declaration of the loop
[edit] Example
#include int main() noexcept { int i{0}; // executes statement 'std::cout << ++i;' // before checking the condition 'i <= 2' do std::cout << ++i; while (i <= 2); }
Output: