The only problem I found was line 16: you have just one colon instead of two after std. Otherwise it worked ok for me with Code::Blocks on Ubuntu.
Ancient Dragon
Retired & Loving It
30,049 posts since Aug 2005
Reputation Points: 5,662
Solved Threads: 2,343