Logo Questions Linux Laravel Mysql Ubuntu Git Menu
 

Visual studio intellisense for headers without .h

I am using a library that has headers without the .h
This defeats visual studio's intellisense (declaration/definition lookup)

Anyone know how to tell VS2008 that a file is a header?

like image 641
Martin Beckett Avatar asked Oct 16 '08 20:10

Martin Beckett


People also ask

Are .h files necessary?

Yes, because it's still based on C. You can answer your own question: Don't use them and try to compile without them. If you can't, then the compilers still require them.

Is .h necessary in C++?

Overview. Every C++ program needs at least one header file to be meaningful. For example, most C++ programs need the cin object to take input from the user and much other pre-written code, which helps to make programming easier, so to use such functionalities, you need a header file.

How do I enable IntelliSense in Visual Studio?

To access this options page, choose Tools > Options, and then choose Text Editor > C# > IntelliSense.

How do I add a header code in Visual Studio?

Place your caret on the first line of any C# or Visual Basic file. Press Ctrl+. to trigger the Quick Actions and Refactorings menu. Select Add file header. To apply the file header to an entire project or solution, select Project or Solution under the Fix all occurrences in: option.


1 Answers

Go to Tools::Options::Text Editor::File Extension tab in Visual Studio. Check the "Map extensionless headers" checkbox, and select the language you want from the combobox.

like image 144
Brian Stewart Avatar answered Oct 12 '22 21:10

Brian Stewart