ENع
الدرس 13 · Classes

Constructors and destructors

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

Every C++ object has a lifetime with a fixed start and a fixed end. The constructor runs when an object is created and sets it up; the destructor runs, automatically, when its lifetime ends. Follow three Cup objects through one small program, see a closing brace destroy them in the reverse order they were made, and meet RAII, the idea that makes C++ clean up after itself.

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

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