C++ Newbie - Please judge my C++ code.

I am having a very hard time understanding what that code is doing, is there a name for what is happening?