PB compiles and builds C++ code fine !! If you have PB installed, you MUST have gcc too... cc might not be a problem with such a simple code since it was installed in former versions of OSX instead of gcc. You should perhaps reinstall the developer tools...
To build a simple C++ application...