开发者

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

开发者 https://www.devze.com 2023-02-08 12:58 出处:网络
This question already has answers here: How to change the default C++ file extension in Eclipse CDT when creating a new file?
This question already has answers here: How to change the default C++ file extension in Eclipse CDT when creating a new file? (4 answers) Closed 7 years ago. 开发者_开发技巧

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!


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.


Look at Window->Preferences->General->Content Types Browse to the Definition of a C++ Source File and add your file associations.


Was wondering the same and just found this:

How to change the default C++ file extension in Eclipse CDT when creating a new file?

0

精彩评论

暂无评论...
验证码 换一张
取 消