无论出于何种原因,我们公司都有一个编码指南,规定:
Each class shall have it's own header and implementation file.
因此,如果我们编写一个名为的类,MyString
我们需要一个关联的MyStringh.h和MyString.cxx.
还有其他人这样做吗?有没有人看到任何编译性能影响?10000个文件中的5000个类的编译速度是否与2500个文件中的5000个类一样快?如果没有,差异是否明显?
[我们编写C++并使用GCC 3.4.4作为我们的日常编译器]
我有一个函数说foo定义为
void foo (int foo_arg)
{
printf("%d",foo_arg);
}
Run Code Online (Sandbox Code Playgroud)
foo_arg的链接类型是什么?