That did it! Thank you!
The tutorial I am using is
http://www.cplusplus.com/doc/tutorial/
I copied the piece of code directly from that, and considering it didn't work, it has lost alot of credibility with me. I'll keep looking around. Perhaps it is best to learn from multiple tutorials to avoid situations like that. Thank you again, you have reassured me of my sanity.