/learn-oop

Learn Object Oriented Programming

MIT LicenseMIT

learn-oop

Learn Object Oriented Programming

[WIP]

Constructor

Initialization of an object is guaranteed by providing a special function called the constructor.

If a class has a constructor, the compiler (or runtime environment for JS people) automatically calls the constructor at the point an object is created.

The constructor call is performed automatically (abstracted away) from the end-programmer; it is performed by the compiler at the point the object is defined.

Resources

  • Book: Thinking in C++