Visual Studio Solution Explorer; add a new filter to a new folder

I come from C # background and learn VC ++. In C #, we only had "Add a new folder" and there is no such thing as "Add a new filter." In VC ++, we can add a new folder OR a new filter.

What are the reasons for the filter? Is this just to help later when combining projects, so you only need to add one "Additional directory" instead of one for each folder, while maintaining your solution explorer with different filters? What was the main reason MS created the Filter concept in Solution Explorer?

What is the best practice (or consensus) out there, you want to split code files into folders or filters? Why?

+5
source share
1 answer

I do not know if you still have this question on the radar.

In our environment with a large number of projects and many header- cpp- and other types of files, we use these filters.

Filters for headers, resources, and sources are predefined. At this level, we add filters for protobuf and xml when necessary.

Under headers- and source filters, we use subfilters to reflect the various namespaces used in the project (even projects are very large, in part).

You are correct that storing all files in one directory eliminates the need to use include directories or access paths in #include statements.

0
source

All Articles