ENع
الدرس 20 · Modern C++

Iterators and algorithms

لم يُترجم بعد؛ يُعرض باللغة الإنجليزية

An iterator marks one position in a container: *it reads the element there and ++it moves on. Two of them, begin() and end(), describe a range, and every standard algorithm works on a range instead of on a container. Walk an iterator along a five-element vector by hand, then watch std::find, std::sort and std::count do the same walk for you, see why "not found" means end(), why sort moves values but not iterators, and how growing a vector can leave old iterators pointing at nothing.

12 دقيقة10 خطوات5 أسئلةAdvanced
شكل 20 · تفاعلي
جارٍ تحميل الرسم…
أو ← →

اختبار يتاح بعد الخطوة الأخيرة.