So I have including the files to my projects by simply : #include "myheader.hpp" and adding the headers into the solution explorer.

But recently I have realized that I may omit the step of adding the headers to the solution explorer because it does not change anything. The only important fact is to define proper include directories in project properties.

Am I missing something here ? Can someone clever explain this to me ?

3 Answers 3


Mainly just to give you single click editing.

The solution explorer doesn't effect the dependancy of the build/compiler.

edit. Sometime's it's necessary if you need to 'compile' a header eg. a COM .idl or some Qt moc header file.


Some source control systems may not add the header files to source control if they are also not added to the solution file. Your mileage may vary, depending on the source control you use and how you use it.


Visual Studio before 2015 doesn't has an option to find in external (e.g. not included in project) files. So including header files can help to find useful information.

  • 1
    Your answer could be improved with additional supporting information. Please edit to add further details, such as citations or documentation, so that others can confirm that your answer is correct. You can find more information on how to write good answers in the help center.
    – Community Bot
    Commented Aug 9, 2023 at 0:34

Not the answer you're looking for? Browse other questions tagged or ask your own question.