File Extensions

This is a discussion on File Extensions within the C++ Programming forums, part of the General Programming Boards category; In MSVC++ 6.0, how do you make it so that your header files without normal extensions, highlight properly (as C++) ...

File Extensions

In MSVC++ 6.0, how do you make it so that your header files without normal extensions, highlight properly (as C++) every time you open the file. If I open the file, right click on it, and select C/C++ as the language, it activates proper highlighting, however, once I save, close, and reopen the file, highlighting is gone. Is it possible to associate certain file extensions with certain languages manually in MSVC++'s options?

I notice that if I open up IOSTREAM or FSTREAM without extensions, highlighting is done properly, but if I create a header with no extension, I have to tell it to highlight every single time I open it. I'm wondering if MSVC++ is just set up to only highlight those particular files because they are a part of the standard library, or if it's possible to mimic this.

I don't know of any way to get Visual Studio to assume C/C++ files no matter what. The only way I've found is to open the file properties window and manually change the file type. Of course, using the proper extensions from the beginning solves the problem, right? :-)