The following topic applies to Eclipse* for C/C++.
To add a source file to the
hello_world project:
- Select the
hello_world project in the
Project Explorer
view.
- Select
File
> New
> Source File. The
New Source File
dialog box opens.
Note
The dialog box automatically populates the source folder for the
source file to be created. You can change this by entering a new location or
selecting
Browse.
- Enter
new_source_file.c in the
Source File
field.
- Select a
Template
from the drop-down list or
Configure
a new template.
- Click
Finish
to add the file to the
hello_world
project.
- In the
Editor
view, add your code for
new_source_file.c.
- When your code is complete,
Save
your file.