In Xcode:
File -> New Project -> Command Line Utility -> C++ Tool.
That project will compile happily on Mac OS X and copied across to Windows/Linux boxen will compile happily as well.
I really feel sorry for you having to learn C++ though. Which uni are you going to?