First, I strongly recommend that you use an up-to-date compiler.
This is not a homework site. If you have problems with an assignment, we're willing to help, but you are expected to show us your attempt and explain your problem, not to wait for someone to do your homework for you. That expectation is inconsiderate and naive, and makes your topic more noise than signal. http://www.cplusplus.com/forum/beginner/1/#msg6680 http://www.catb.org/~esr/faqs/smart-questions.html