views:

54

answers:

4

When making a .NET project, then you can create folders in your solution explorer and these are real folders on the hard drive. When using C++ however they are only filters. Is there a way to set filters to be actually folders?

A: 

Can't you just create a folder with the same name in explorer and then "add existing" from there? (You can set the filter to *.* to match all files, too.)

Markus
A: 

A filter is a folder, just given a funny name. You can drag any file from the project into any of the "filters".

They are not mirrored as folders on your disk though, they're virtual folders in the project only.

gbjbaanb
+2  A: 

I don't see an automagic way to do this. What you need to do is:

  1. Create a physical folder.
  2. Create the filter in the C++ project.
  3. Add files from the physical folder to the solution.
  4. Drag the added files into the filter folder.

Because c/c++ are so path dependant I found it was easier to keep the project in one folder, rather than create sub-project folders. Most C++ projects that I worked with a like that, unlike C# projects where its beneficial to organise the project into subnamespaces.

Igor Zevaka
A: 

There's a button to show the hard-drive in the solution explorer.

DeadMG