| Lecture 4 - Slide 13 : 40|
Resource acquisition is initialization - RAII
There is no automatic memory managment in C++
Therefore it is attractive to attach resource management to construction and destruction of stack-allocated objects
The resource is encapsulated in a class together with allocation and release member functions
A class Resource and its application in the function use_resource - principles only.
A class Resource and its application in the function use_resource - compilable version.
Program output - normal run.
Program output - with problem_condition.