I am working on a large C++ project in Visual Studio 2008, and there are a lot of files with unnecessary
While it won't reveal unneeded include files, Visual studio has a setting
/showIncludes (right click on a
Properties->C/C++->Advanced) that will output a tree of all included files at compile time. This can help in identifying files that shouldn't need to be included.
You can also take a look at the pimpl idiom to let you get away with fewer header file dependencies to make it easier to see the cruft that you can remove.