Abstraction Mechanisms, Part 1


In this lecture we discuss the fundamental abstraction mechanisms in C++: classes and structs. We first concentrate on constructors and destructors. Next we look at the RAII (Resource acquisition is initialization) idea in C++, including a discussion of some of the C++11 smart pointers. We also study how to program the meaning of object copying - in copy constructors and copy assignment. Visibility and access, in particular friends, is also covered. Finally we go into operator overloading for user defined types.

Table of contents