I’m using Microsoft Visual Studio 2010. When I add files to my project, they have a .cpp extension. To work with C, I have to manually rename the files to .c.
Is there any way to directly add C files, without renaming anything?
Sign Up to our social questions and Answers Engine to ask questions, answer people’s questions, and connect with other people.
Login to our social questions & Answers Engine to ask questions answer people’s questions & connect with other people.
Lost your password? Please enter your email address. You will receive a link and will create a new password via email.
Please briefly explain why you feel this question should be reported.
Please briefly explain why you feel this answer should be reported.
Please briefly explain why you feel this user should be reported.
If I’m understanding correctly, you want to directly add a C file to the project. Unfortunately, I don’t think VS provides any means to do so; you’ll just have to rename newly added files.
You can rename a file from within the IDE. Right click the file and hit rename (or click on the file and push F2).
Click file, push F2. http://blackninjagames.com/images/rename_file.PNG