Logo Questions Linux Laravel Mysql Ubuntu Git Menu
 

How to make a Visual Studio C++ project structure match the file system structure?

I'm currently using Visual Studio 2010 Professional. In my entire experience with Visual Studio (since version 6), a C++ project structure was always virtual. In other words, when I move files around and create folders in the project, this had no bearing on the actual structure on the filesystem. I've always had to manage the two independently (the filesystem structure and the project structure).

Is there a way to make C++ project structure in Visual Studio act as it does in C#, whereby all move/copy/create folder/etc operations in a C++ project directly affect the corresponding file system hierarchy?

Thanks in advance.

like image 483
void.pointer Avatar asked Jul 16 '10 14:07

void.pointer


People also ask

How do I sync a folder in Visual Studio?

from the menu on the top-right corner of the Visual Studio Code IDE. You can also use a keyboard shortcut Control+Shift+P in Windows and Command+Shift+P in MacOS to open the command palette and choose Now: Sync Current File from the list.

What is a CPP solution?

Solution in C/C++The test system creates an isolated, empty environment for your program, compiles it and runs it several times with a different set of input data. After that, the test system compares the output of the program with the expected result using a special algorithm.

What is a file structure in programming?

File structures are not fixed entities, but rather build a framework that communicates the function and purpose of elements within a project by separating concerns into a hierarchy of folders and using consistent, chronological, and descriptive names.


1 Answers

I'm afraid it's not possible, since Visual C++ and Visual C# handle "folders" quite differently.

In Visual C++, folders are more akin to filters, for example a "Source Files" folder might be hinted as a filter to contain .cpp files, while a "Header Files" will contain .h files.

However there's a workaround, described here : Visual Studio projects with multiple folders

like image 129
SirDarius Avatar answered Sep 30 '22 19:09

SirDarius