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

raii-pattern-0.cc
A class Resource and its application in the function use_resource - principles only.
raii-pattern-1.cc
A class Resource and its application in the function use_resource - compilable version.
normal-run
Program output - normal run.
problem-run
Program output - with problem_condition.