Home > Articles > Programming > C/C++

C++ Reference Guide

Hosted by

Special Member Functions: Constructors, Destructors, and the Assignment Operator

Last updated Jan 1, 2003.

Objects are the fundamental unit of abstraction in object-oriented programming. In a broad sense, an object is a region of memory storage. Class objects have properties that are determined when the object is created. Conceptually, every class object has four special member functions: default constructor, copy constructor, assignment operator, and destructor. If these members are not explicitly declared by the programmer, the implementation implicitly declares them. This section surveys the semantics of the special member functions and their roles in class design and implementation.