Learning C++ on Mac OS X

Cover of Deitel & Deitel C++ How to Program Just a quick tip, but the book C++ How to Program, 5th Ed. by Deitel & Deitel thoroughly covers beginnning C++, and each example works just as well on Windows using a compiler such as Microsoft Visual C++ as well as on Linux using GCC. GCC ships installed with every Mac and works just the same, minus a few extra Apple-only extensions included for legacy compatability. Just use this pattern in Terminal to compile your code:

g++ name_of_main_file.cpp -o target_application

BBEdit works great with command-line GCC. Xcode makes a great C++ IDE too. I’ve been switching between using BBEdit/GCC and Xcode as I go through the book and haven’t had a problem yet. The book stays safely clear of any windowing issues or proprietary items, sticking instead to core ANSI C++.