what is raii and functors and how do i utilize these in order to become the greatest programmer in the world

im downloading the boost library now, i dont know why i think i will succeed in installing its complicated ass but apparently the secret is to learn a library at a time and to get clever with modern prgrmn tricks like raii and functors (sound like westside story bouncer names)

what are they, and should i just learn qt instead? its just that qt actually feels too easy and i dont understand why any of the coding does anything that it does do which is not the point of learning for the sake of it like i am
Last edited on
The majority of boost is headers only. If you know how to type #include you can use it.
so whats raii and functor when they not bouncing mafiosos


@moschops its not that eeasy code blocks an boost hate me, i can add headers but not ones like asio which need libs :( i guess its java for it then
Last edited on
RAII is a poor name for when you deallocate resources in the destructor.
Why is this important? Because there's no garbage collector in C++ to free resources if something bad happens, like an exception being thrown.
http://en.wikipedia.org/wiki/Resource_Acquisition_Is_Initialization
http://en.wikibooks.org/wiki/More_C%2B%2B_Idioms/Resource_Acquisition_Is_Initialization

Functors are objects used as functions, with the help of operator()():
http://www.cprogramming.com/tutorial/functors-function-objects-in-c++.html
Last edited on
Topic archived. No new replies allowed.