to compile a c++ program in windows, as far as i know, we must have some IDE (Integrated Development Environment) and compile from there. 2 free IDEs are:
- Dev-C++ from Bloodshed Software (http://www.bloodshed.net/)
- Eclipse IDE for C/C++ Developers (http://www.eclipse.org/)
g++ file.cpp -o output.file
there is other way on Mac, is the Xcode. you can either download it (pay) or install it from the application CD comes with your Mac.