How do you compile C++ on a mac?

Open the command prompt and type g++ 'yourprogram.c' and it should compile and leave you with an executable called a.exe or something like that. Run the executable by typing ./a.exe.

Leave a Comment