Become a MacRumors Supporter for $50/year with no ads, ability to filter front page stories, and private forums.
I'd alias g++ -o /my/dir/ to a short command. Or just always compile from the desired directory. Or use a makefile.

-Lee
 
Register on MacRumors! This sidebar will go away, and you'll see fewer ads.