Creating a source file

Files are edited in the source editor that is, by default, located in the editor area to the right of the Project Explorer or source Projects views.

The marker bar on the left margin of the source editor, displays icons for errors, warnings, bookmarks, breakpoints and tasks.

For more information on the marker bar, see Workbench User Guide > Reference > User interface information > Views and editors > Editor area.

To create a source file:

  1. In the Project Explorer or C++ Projects view, right-click a project, and select New > File.
    New > File in Projects View
  2. In the list of projects, verify that the correct project is selected.
  3. In the File name box, type a name followed by the appropriate extension.
  4. Click Finish.
    New File Wizard

    The file will open in the source editor.

  5. Enter your code in the editor view.
    Editor view with a sample code
  6. Type CTRL+S to save the file.

Related concepts
Projects
Project file views

Related tasks
Displaying file structure in the Project Explorer view

Related reference
Project properties


IBM Copyright Statement