

To compile and run your program, click the run button in the top left corner of the window.When you do that, additional information (including the full path to that file) will appear in the pane on the right. You can find the full path information by clicking on a text file in the project pane. The best way to make this work is to replace the simple file names "numbers.txt" and "copy.txt" in the open() commands with full paths to the files. When your program runs it will need to locate these text files.Type some numbers into the numbers.txt file and then repeat the process to create an empty text file named "copy.txt".In the dialog that appears, select the Other category and the Empty file option. To add a text file to the project, right-click on the project folder in the project view in the left pane and select the option New Item. Since our first example program needs to work with a couple of text files we will need to create those and add them to our project.For our first example you won't need to type anything - just copy and paste the code you see in the source code section below to replace the source code that Xcode generated for you when you set up the project. This is where you will type the source code for your program.

The pane in the middle is the source code editor pane.

Most of the programs we will write for the first few weeks of this course will consist of a single C++ source code file, usually named 'main.cpp'.
