Home > Software engineering >  How do I know which C source files include a specific h header file
How do I know which C source files include a specific h header file

Time:07-30

I am studying a big C project and find a critical header file. I want to find all those .cpp files which include this header file to know the header file's influence scope. However I cannot find a simple way (several clicks or commands) to achieve this via vscode. Is there any trick can get this done? preferably using vscode.

Example, say we have source code files a.cpp, b.cpp, c.cpp..., and a header file foo.h, how do I know which source code file include this foo.h without opening them and check one by one?

CodePudding user response:

Try "Edit->Find in Files" option inside VSCode for the header file you are looking for. The search result will give you the desired answer.

  • Related