C++ キーワード: do
From cppreference.com
[編集] 使用法
-
do-whileループ: ループの宣言として
[編集] 例
このコードを実行
#include <iostream> int main() noexcept { int i{0}; // executes statement 'std::cout << ++i;' // before checking the condition 'i <= 2' do std::cout << ++i; while (i <= 2); }
出力
123
[編集] 関連項目
|
(C++17以降) |
|
(C++23から) |
- switch ステートメント:
switch,case - default (case ラベル宣言として) など:
default - goto ステートメント:
goto - continue ステートメント:
continue - break ステートメント:
break - return ステートメント:
return
| (C++20以降) |