How can I change the default extension for C, C++, or header files?

By default, C++ files are created with a .cpp extension and header files are created with a .h extension.

To change the default extension, do the following

  • Choose Tools > Options.
  • Select C/C++ in the top pane.
  • Select the Other tab. The default extensions are shown in bold.
  • Click Edit for the extensions you want to edit.
  • In the Extensions List dialog box,you can add new extensions and set the default extension


Applies to: NetBeans 6.1 and later
Platforms: all

Not logged in. Log in, Register

By use of this website, you agree to the NetBeans Policies and Terms of Use. © 2012, Oracle Corporation and/or its affiliates. Sponsored by Oracle logo