# Structure of Visual C++ Projects in Visual Studio

In particular, I was wondering if it was possible for Visual Studio to treat source files in different directories as all in the same directory. I first saw this after purchasing the Introversion Software Humble Bundle which gave people access to their source code for their previous games from Subversion. I noticed with one of their games that it was split into physical folders for different parts (like "\world", "\lib", ect.), but in Visual Studio the files were put into filters with the same names as the physical folder and all of the files were treated as if they were in the base directory. I also noticed that they included files in the VS project that weren't even in the base project folder. This is what I mean:

Things like the \data folder are included with the folders from \source, even though they are in different directories and levels.

What I also want to know is how to go about including folders and files from different locations and treat them all like they are all in the same place. But most of all, I would like to figure out how they made all source files act like they were all in the base folder, instead of the separate physical folder that they are, as shown by the #includes in the files:

Image Here

As you can see, the app.h/.cpp files are in the "\app" folder, but the includes are able to reference things from "\lib" without including "..\lib" to go up a folder, effectively treating all of the source files like they originate in the base folder.

TL;DR: How does one include multiple folders from different places as filters, and how do you treat all source files like they originate from the same place.

Any help is greatly appreciated, as this will help me organize my project better. Thanks.

• Thanks for the prompt answer. But does this explain how to source files in the different physical folders are able to #include other files without "..\" to go up a directory? – sm81095 Sep 12 '13 at 2:19
• That's because visual studio allows you to set paths called include directories. If there is an include directory pointing to where that file is you can still #include it without having to do any directory switching. – Connor Hollis Sep 12 '13 at 2:43