Logo Questions Linux Laravel Mysql Ubuntu Git Menu
 

How to set the C++ file extension to .cc in Eclipse for files created when starting a new project? [duplicate]

By default Eclipse (CDT) uses .cpp file extension for C++ files. I would like it to use .cc (and .hh) extensions instead but I cannot find such an option anywhere.

edit: To be precise, it creates a .cpp file when I start a new C++ project. Can this behaviour be changed to creating a .cc file?

I would have expected it under Window > Options > C/C++ > File Types, but as far as I can see that doesn't help. I've searched Google and the only page I found explains how to do it in Netbeans. Any help is greatly appreciated!

like image 547
Paul Avatar asked Feb 03 '11 12:02

Paul


People also ask

What is a .cc File extension?

Source code for a C++ program; may include all the code for a single program or may be one of several source code files referenced by a programming project; contains functions that are compiled into machine code, which the computer's operating system can understand.

What is the extension of C program File used for running?

It is common practice across most platforms (ie: UNIX, Microsoft Windows, etc) that C source code files end with the ". c" extension. This is in contrast to C++ source code files which can and do vary in ending from ". cc" to".


1 Answers

The place to enter your extension is in Window → Preferences → General → C/C++ → File Types. Click the New button, enter your extension and select the file association.

like image 74
ctubbs Avatar answered Sep 28 '22 01:09

ctubbs