Under your post, click "Edit this post"
Then add [*code=c++] before your code and [*/code] after but without the *'s.
[noparse][/noparse] tags are also brilliant!
I agree with ddanbe, you should start simple. Don't just dive into someone elses code and expect to be able to understand it all from the go.
Chris