Here is a really simple piece of code that works as a magic 8-ball program where the user types in a yes/no question and a random response is returned.
This could be a good read for new C++ programmers (like me), as it covers a lot of basics: cout, arrays, strings, rand and srand, a main program loop, and booleans.
Hope this helps someone!
P.S. I commented a lot so people could tell what was going on easily: hope it doesn't look too bloated :)