是否可以组织c ++头和cpp文件? [英] Is it possible to organize c++ header and cpp files?

查看:129
本文介绍了是否可以组织c ++头和cpp文件?的处理方法,对大家解决问题具有一定的参考价值,需要的朋友们下面随着小编来一起学习吧!

问题描述

我不确定我是否要求一个有效的问题,但这里是。

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

我有一个结构为

[文件夹]头文件 -

[folder] Header files -

... 200个头文件..

... 200 header files ..

[文件夹]源文件 -

[folder] Source files -

... 200 soure文件..

... 200 soure files ..

... rest

是否可以按照C#项目中的文件夹来组织头文件和soure文件?我面临的问题是,随着项目的增长,它越来越难以导航通过一大堆文件,这将更容易导航,如果他们组织的功能(如c#项目中的文件夹和命名空间) 。

Is it possible to organize header and soure files by folders as you would in a C# project? The problem I'm facing is, as the project grows, it gets tiresome to navigate through a huge pile of files, which would be much easier to navigate to, if they were organized by functionality (such as folders and namespaces in c# projects).

是否有某种标准,将由各种各样的编译器支持,而不是单独的Visual Studio?

Is there a some kind of standard, that would be supported by a wide variety of compilers and not Visual Studio alone ?

例如:

[folder]头文件 -

[folder] Header files -


  • [folder] X domain

    • 100个头文件


    • 100个头文件

    [folder]来源档案 -

    [folder] Source files -


    • [folder] X domain

      • 100 cpp档案


      • 100个cpp档案

      ... rest

      推荐答案

      头文件/源文件不是Visual Studio强加的要求。这只是默认布局,它是虚拟的,而不是物理的。如果您单击解决方案资源管理器中的显示所有文件,它将显示文件夹树,因为它是在硬盘驱动器上,你可以操作,你认为合适。这是唯一理智的配置,我不知道为什么默认是这样的。此外,自然,他们固定为C#项目,但不是C ++。

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

      这篇关于是否可以组织c ++头和cpp文件?的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持IT屋!

查看全文
登录 关闭
扫码关注1秒登录
发送“验证码”获取 | 15天全站免登陆