run c++ program in mac terminal code example Example: run c++ program in mac terminal g++ sort.cpp -o sort ./sort