continue statement
提供: cppreference.com
![]() |
このページは、Google 翻訳を使って英語版から機械翻訳されました。
翻訳には誤りや奇妙な言い回しがあるかもしれません。文章の上にポインタをおくと、元の文章が見れます。誤りを修正して翻訳を改善する手助けをしてください。翻訳についての説明は、ここをクリックしてください。 |
for同封の残りの部分を引き起こし、range-for、whileまたは<div class="t-tr-text"> これは、do-while
ループ本体スキップ.Original:
do-while
The text has been machine-translated via [http://translate.google.com Google Translate].
You can help to correct and verify the translation. Click [http://en.cppreference.com/w/Cppreference:MachineTranslations here] for instructions.
You can help to correct and verify the translation. Click [http://en.cppreference.com/w/Cppreference:MachineTranslations here] for instructions.
Original:
Causes the remaining portion of the enclosing for, range-for, while or
これは、do-while</div> loop body skipped.
Original:
do-while
The text has been machine-translated via [http://translate.google.com Google Translate].
You can help to correct and verify the translation. Click [http://en.cppreference.com/w/Cppreference:MachineTranslations here] for instructions.
You can help to correct and verify the translation. Click [http://en.cppreference.com/w/Cppreference:MachineTranslations here] for instructions.
The text has been machine-translated via Google Translate.
You can help to correct and verify the translation. Click here for instructions.
You can help to correct and verify the translation. Click here for instructions.
それは条件文を使ってループの残りの部分を無視するそうでなければ扱いにくいである場合に使用され.
Original:
Used when it is otherwise awkward to ignore the remaining portion of the loop using conditional statements.
The text has been machine-translated via Google Translate.
You can help to correct and verify the translation. Click here for instructions.
You can help to correct and verify the translation. Click here for instructions.
目次 |
[編集] 構文
continue
|
|||||||||
[編集] 説明
この文では、外側のループ本体の端へのショートカットとして機能します.
Original:
This statement works as a shortcut to the end of the enclosing loop body.
The text has been machine-translated via Google Translate.
You can help to correct and verify the translation. Click here for instructions.
You can help to correct and verify the translation. Click here for instructions.
whileまたは<div class="t-tr-text"> これは、do-while
ループの場合は、実行される次の文は、条件チェック(cond_expression)です。 forループの場合には、次に実行されるステートメントは、反復式と条件チェック(iteration_expression、cond_expression)です。その後ループが通常どおり継続.Original:
do-while
The text has been machine-translated via [http://translate.google.com Google Translate].
You can help to correct and verify the translation. Click [http://en.cppreference.com/w/Cppreference:MachineTranslations here] for instructions.
You can help to correct and verify the translation. Click [http://en.cppreference.com/w/Cppreference:MachineTranslations here] for instructions.
Original:
In case of while or
これは、do-while</div> loops, the next statement executed is the condition check (cond_expression). In case of for loop, the next statements executed are the iteration expression and condition check (iteration_expression, cond_expression). After that the loop continues as normal.
Original:
do-while
The text has been machine-translated via [http://translate.google.com Google Translate].
You can help to correct and verify the translation. Click [http://en.cppreference.com/w/Cppreference:MachineTranslations here] for instructions.
You can help to correct and verify the translation. Click [http://en.cppreference.com/w/Cppreference:MachineTranslations here] for instructions.
The text has been machine-translated via Google Translate.
You can help to correct and verify the translation. Click here for instructions.
You can help to correct and verify the translation. Click here for instructions.
[編集] キーワード
[編集] 例
このコードを実行します
#include <iostream> int main() { for (int i = 0; i < 10; i++) { if (i != 5) continue; std::cout << i << " "; //this statement is skipped each time i!=5 } std::cout << '\n'; for (int j = 0; j < 2; j++) { for (int k = 0; k < 5; k++) { //only this loop is affected by continue if (k == 3) continue; std::cout << j << k << " "; //this statement is skipped each time k==3 } } }
出力:
5 00 01 02 04 10 11 12 14