Using Content Assist

Use Content Assist to insert C/C++ elements of your project or referenced project(s), and code templates into your code. You can insert a code template into your source code rather than retyping commonly-used snippets of code.

To insert a code template or element:

  1. In the C/C++ editor, type at least the first letter of a code template or element then Ctrl+Space.
    A list displays the code templates followed by the elements that start with the letter combination you typed.
  2. Screen Capture of Content Assist Example
  3. Do one of the following:

To set Content Assist preferences:

  1. Click Window > Preferences.
  2. Expand C/C++, and click C/C++ Editor.
  3. Click the Content Assist tab.
    Screen Capture of Content Assist Preferences
  4. Do the following:
  5. Click OK.

Related concepts
Content Assist

Related tasks
Creating and editing code templates
Importing and exporting code templates

Related reference
Content Assist page, Preferences window
Code Templates page

IBM Copyright Statement