C.Plus.Plus.Primer.4th.Edition [Electronic resources] نسخه متنی

اینجــــا یک کتابخانه دیجیتالی است

با بیش از 100000 منبع الکترونیکی رایگان به زبان فارسی ، عربی و انگلیسی

C.Plus.Plus.Primer.4th.Edition [Electronic resources] - نسخه متنی

| نمايش فراداده ، افزودن یک نقد و بررسی
افزودن به کتابخانه شخصی
ارسال به دوستان
جستجو در متن کتاب
بیشتر
تنظیمات قلم

فونت

اندازه قلم

+ - پیش فرض

حالت نمایش

روز نیمروز شب
جستجو در لغت نامه
بیشتر
لیست موضوعات
توضیحات
افزودن یادداشت جدید







6.11. The continue Statement


continue statement causes the current iteration of the nearest enclosing loop to terminate. Execution resumes with the evaluation of the condition in the case of a while or do while statement. In a for loop, execution continues by evaluating the expression inside the for header.

For example, the following loop reads the standard input one word at a time. Only words that begin with an underscore will be processed. For any other value, we terminate the current iteration and get the next input:


string inBuf;
while (cin >> inBuf && !inBuf.empty()) {
if (inBuf[0] != '_')
continue; // get another input
// still here? process string ...
}

A continue can appear only inside a for, while, or do while loop, including inside blocks nested inside such loops.


Exercises Section 6.11



Section 6.10 (p. 213) so that it looks only for duplicated words that start with an uppercase letter.



/ 199