What?! Does your professor didn't teach you how to run the basics? I think that example was part of the "basic" coding. Again, I'm not here to oblitirate anyone, I'm just saying that that example was the building block on c++.
just start from scratch . .u cannot understand c++ or c# if you cannot understand basic C language. start to C language and study all about it. and after all of that ,I assure you you can understand the basic function of C ++ even in complex program of it.