小编mot*_*his的帖子

将名称空间声明添加到许多文件?

假设我有很多要向其中添加名称空间声明的c ++文件。即我希望文件看起来像:

//pre-processor commands and other stuff not in the namespace
namespace foo
{
    //previously existing code
}
//EOF
Run Code Online (Sandbox Code Playgroud)

有什么方法可以不必手动打开每个文件?到目前为止,我能想到的最好的是一个emacs宏来对每个文件进行处理,但是我仍然必须遍历每个文件。

c++ namespaces

2
推荐指数
1
解决办法
378
查看次数

标签 统计

c++ ×1

namespaces ×1