Templates are sections of code that occur frequently enough that you would like to be able to insert them with a few keystrokes. This function is known as Content Assist; the sections of code that are inserted are known as templates.
To input an existing Content Assist template into a file, such as one for an if statement, type the initial character ("i" in this case), then press Ctrl+Space. The templates that begin with that character appear. Double-click on a template to insert it into a file.
You can edit existing Code/Content Assist templates or create new ones. From the menu bar choose Window > Preferences > C/C++ > Code Templates.
Creating and editing code templates
Using templates
Importing and exporting code templates
Edit menu
Content Assist page, Preferences window
Code Templates page, Preferences window