Is it possible to organize c++ header and cpp files?

后端 未结 2 1181
星月不相逢
星月不相逢 2020-12-31 07:07

I\'m not sure if i\'m asking a valid question, but here goes.

I have c++ solution with a structure of

[folder] Header files -

... 200 header files ..

相关标签:
2条回答
  • 2020-12-31 07:55

    Header/Source file is not a requirement imposed by Visual Studio. That's just the default layout, and it's virtual, not physical. If you click "Show all files" in the solution explorer, it will show the folder tree as it is on the hard drive- which you can manipulate as you see fit. This is the only sane configuration and I have no idea why the default is that way. Plus, naturally, they fixed it for C# projects but not C++.

    0 讨论(0)
  • 2020-12-31 07:56

    I don't know of a standard but you can put headers (and source) files in any folder structure you like.

    You need to ensure that either the include files are referenced by relative path or add the folder to the projects search path.

    0 讨论(0)
提交回复
热议问题