Game Development Community

dev|Pro Game Development Curriculum

Getting Visual Studio Editor to recognize cc files

by Glen Farrell · 02/06/2004 (1:00 pm) · 6 comments

Ever been frustrated at how Visual Studio displays cc files? The update GG provides will allow you to compile properly, but the editor still treats cc files as plain text. Here's how to fix that!

Note that these instructions are for Microsoft Visual Studio 6.0. For other editors you're on your own, but maybe this'll at least give you an idea of where to look ...

1) Close Visual Studio

2) Open regedit

3) Browse to the following key:

[HKEY_CURRENT_USER\Software\Microsoft\DevStudio\6.0\Text Editor\Tabs/Language Settings\C/C++]

4) Under that key, you'll see a value defined for "FileExtensions", listing a bunch of C++ extensions. Simply add cc to this list:

cpp;cxx;c;cc;h;hxx;hpp;inl;tlh;tli;rc;rc2

5) Open up Visual Studio, and open your workspace. If you have any cc files already open, close them - Visual Studio will only determine the type of a file when you first open it in your workspace.


That's it! From now on, the Visual studio editor will now treat cc files as C++. Giving you all the corresponding benefits (color coding, smart indenting, object info, parameter info ...).

#1
02/06/2004 (6:38 pm)
Also, there's a file named "VC6 .cc compiling.reg" into the vc6 directory that does this, just double click and answer yes. :)
#2
02/06/2004 (9:18 pm)
as well as one in the vc7 directory.
#3
02/07/2004 (9:05 am)
And here I figured it out the hard way! Can't remember where I got GG's reg file from, but it only setup the compiler for me, not the editor. I'm thinking though that I might've had VC open at the time ...
#4
02/08/2004 (7:11 am)
As long as you are at it you might also include the steps to make the files appear with the proper graphics in the Explorer. I can't speak for the 101 flavors of Microsoft Operating Systems, but for Windows 2000 the process is pretty painless (although a bit abstruse to locate).

In Explorer click on Tools -> Folder Options. Select the File Types tab. Click on the New button and when a small dialog box opens click on Advanced. In the upper half of the box type the letters "cc". (Without the quotation marks.) The lower half of the dialog is a list box in alphabetical order. Scroll down until you see "C++ Source File". Click on it and then click on the OK buttons to indicate you are done. Close and reopen your copy of Explorer and all of your C++ files should now have the proper C++ graphic.

I imagine the process is similar in most of the other Microsoft OS's.
#5
11/03/2004 (4:34 pm)
doesnt work
#6
06/29/2005 (2:03 pm)
..yes it does