We'll now set up the project with some files that demonstrate features of the CrossStudio IDE. For this, we will add one pre-prepared and one new file to the project.

###### Adding an existing file to a project

We will add one of the tutorial files to the project. To add an existing file to the project, do the following:

- From the File menu, click Add Existing File.

—or—

- Type Ctrl+D.

—or—

- In the Project Explorer, right click the Tutorial project node.
- Select Add Existing File from the context menu.

When you've done this, CrossStudio displays a standard file locator dialog. Navigate to the CrossStudio installation directory, then to the `tutorial` folder, select the `fact.c`.

Now click Add to add the file to the project. The Project Explorer will show `fact.c` with a shortcut arrow because the file is not in the project's home directory. Rather than edit the file in the tutorial directory, we'll take a copy of it and put it into the project home directory:

- In the Project Explorer, right click the `fact.c` node.
- From the popup menu, click Import.

The shortcut arrow disappears from the `fact.c` node which indicates that the file is now in our project home directory.

We can open a file for editing by double clicking the node in the Project Explorer. Double clicking `fact.c` brings it into the code editor:

###### Adding a new file to a project

Our project isn't complete as `fact.c` is only part of an application. We'll add a new C file to the project which will contain the main() function. To add a new file to the project, do the following:

- From the Project menu, click Add New File.

—or—

- On the Project Explorer tool bar, click the Add New File tool button.

—or—

- In the Project Explorer, right click the `Tutorial` node.
- From the context menu, click Add New File.

—or—

- Type Ctrl+N.

The New File dialog appears.

- Ensure that the C File (.c) icon is selected.
- In the Name edit box, type `main`.

The dialog box will now look like this:

Click OK to add the new file.

CrossStudio opens an editor with the new file ready for editing. Rather than type in the program from scratch, we'll add it from a file stored on disk.

- From the Edit menu, click Insert File or type Ctrl+K, Ctrl+I.
- Using the file browser, navigate to the `tutorial` directory.
- Select the `main.c` file.
- Click OK.

Your `main.c` file should now look like this:

Next, we'll set up some project options.