samedi 29 décembre 2018

How to organize a C ++ large project in Visual Studio

I would like to separate my source code into folders to have a better organization by grouping the files into directories.

In general there are a lot of .h and .cpp files and I usually go separating the folders. I have always used netbeans, but recently I decided to test Visual Studio.

When starting the code (little thing, to follow a tutorial of creation of games in SDL), I began to organize the source in folders. In Visual Studio when I'm working with C ++ I see the option to add filter, to organize the file structure, but I do not see the option to add folders.

I can organize the code in what visually seems to be a folder structure, but when I go to check the files are a mess, it's all mixed up at the root of the program. Menu options only allow me Add a filter:

Apparently it gets organized, but only visually, the codes all remain in the same place.

I would like to know if inside visual studio there is a way to convert these filters into folders, or how to add the folder through visual studio, because I ended up creating the folders and reorganizing manually.

Not that I usually have files with the same name, but in that environment for example this would be impossible. Besides that I think it gets pretty messy if you look for something, or if you need to switch IDE in the future, because I believe that this logical organization will not be reused in another IDE such as Eclipse, Netbeans and etc.

Aucun commentaire:

Enregistrer un commentaire