Useful resources for writing C++ code in Mac using Xcode
How to run an executable file
- In Xcode, an executable file is in the product folder below the main folder (the one that contains main.cpp file) in the left-hand side section.
- The file name is the project name (without any extension).
- Here are the step to run the file
- Right click on the file -> select “Open in finder”
- Launch the Terminal
- Type “cd” in the Terminal and Drag the folder that contains the file to the Terminal
- Type “./” and the project name followed by the requirement for the program