Mat
Mat

Reputation: 2793

visual c++ - check through what chain of #includes a type gets declared

is there a way in visual studio to select some type and display how it gets included into the current file?

for example i'd like to click on some membervariable

SomeType a;

and then get displayed something like "first_include.h"->"second_include.h"->"SomeType.h"

to understand what chain of includes the compiler uses to take the declaration of the variable SomeType.

Thanks!

Upvotes: 1

Views: 769

Answers (1)

341008
341008

Reputation: 10232

Try the "show includes" option in C/C++->"Advanced Project Settings".

EDIT:

"Show includes" will display all the files that are includes from a particular file. Include files shown will be indented according to the level at which they are included. Use "go to definition" to find which file has the definition and then simply look for the hierarchy of includes which leads to that file.

Upvotes: 1

Related Questions