📘 ملخص جامعاتنا · من الطالب للطالب
Object-Oriented Programming (C++) — الملخص الشامل (المحاضرات 1–4) | جامعة العلوم والتكنولوجيا الأردنية
ملخصات جامعاتنا المجانية · ملخص شامل
Object-Oriented Programming (C++) (غير محدد) — الملخص الشامل
💡 مبني على منهاج مادة Object-Oriented Programming (C++) — جامعة العلوم والتكنولوجيا
الفصل 1: Pointers & Dynamic Memory (المؤشرات والذاكرة الديناميكية)
الفكرة الأساسية
- A pointer is a variable that stores an address; with new and delete you control memory on the heap — and you must free what you allocate.
💡 المؤشر متغيّر بيخزّن عنوان بالذاكرة. وبـ new وdelete إنت بتتحكم بذاكرة الـ heap، وأي إشي بتحجزه لازم ترجع تحرّره.
Memory, addresses and sizes (الذاكرة والعناوين والأحجام)
- Memory is like a giant array of bytes; each byte has an address (32 bits long on a 32-bit computer).
- Every variable lives at an address; the address of a variable = the address of its first byte.
- Typical sizes: char 1 byte, int 4, float 4, double 8; check with sizeof().