ENع
الدرس 15 · Classes

Copy and move

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

An object that owns memory can be copied or moved. A copy makes a new block and copies every element into it, so the two objects are independent. A move hands the existing block to the new object and leaves the old one empty, so nothing is copied. Follow a std::vector through one copy, one move and the end of its scope, then see the rule of five and the rule of zero.

11 دقيقة9 خطوات5 أسئلةIntermediate
شكل 15 · تفاعلي
جارٍ تحميل الرسم…
أو ← →

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