I find that I can only copy file and organize them from explorer. Afterward, I include those file into the project. Actually, Visual Studio will parse the header file automatically.
VS can't find the header file located at obvious position
As you can see, I placed game.h in the header file filter and hecate.cpp in the source file filter. The hecate.cpp file includes game.h, but it shows an error indicating that the game.h file is not found. How can Visual Studio make such an obvious mistake? I thought that since you classify files into header and source filters, it should work automatically.
2 answers
Sort by: Most helpful
-
-
RLWA32 45,691 Reputation points
2024-06-27T10:44:05.1733333+00:00 The filters file used with a C++ project is only used by the Visual Studio IDE for organizing and displaying files in the Solution Explorer. It has no bearing on how the compiler searches for files specified with the #include directive.
For example, the same C++ project build successfully with or without a filters file. You can see the difference in the displayed solution explorer panes.
With filters file
Without Filters file