我的项目目录如下:
proj
--src
--include
--image_processing
--kernel.hpp
--image_processing.hpp
在image_processing.hpp
中,我有:
namespace ImageProcessing{
class Kernel;
}
在kernel.hpp
,我有:
#include "image_processing.hpp"
class ImageProcessing::Kernel {
//...
}
这是名称空间定义的正确/建议文件夹结构吗?
答案 0 :(得分:0)
我习惯的是为每个命名空间使用一个文件夹(比如在块中跳转源),包括src和include。像。的东西。
proj
-- imageprocessing
--src
--include
--kernel.hpp
--image_processing.hpp
-- another namespace folder
....
但是我认为你可以按自己喜欢的方式行事。