Puppy
Puppy

Reputation: 146968

How to use folders in VC10

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?

Upvotes: 0

Views: 482

Answers (4)

Puppy
Puppy

Reputation: 146968

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

Upvotes: 0

sunside
sunside

Reputation: 8259

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.)

Upvotes: 0

Igor Zevaka
Igor Zevaka

Reputation: 76550

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.

Upvotes: 2

gbjbaanb
gbjbaanb

Reputation: 52679

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.

Upvotes: -1

Related Questions