Writing C++ in mac
Simple steps to get started with writing C++ in your MacOS.
Step 1:- Download Xcode. Accept the license agreement.
We need to download a compiler. Xcode comes inbuilt with a gcc compiler for Mac.
Step 2:- Compile your file in terminal.
Write the statement g++ <file_path> <file_name> -o//drag your file to the terminal and the path will be copied automatically.

Step 3:- See the output
Write the statement ./<file_name>

That’s it!