摘要:
转自如何使用前置声明取代包括头文件这篇文章很大程度是受到Exceptional C++ (Hurb99)书中第四章 Compiler Firewalls and the Pimpl Idiom (编译器防火墙和Pimpl惯用法) 的启发,这一章讲述了减少编译时依赖的意义和一些惯用法,其实最为常用又无... 阅读全文
摘要:
参考What is the difference between g++ and gcc?1.The actual compiler is "cc1" for C and "cc1plus" for C++; both gcc and g++ are drivers (which call the ... 阅读全文
摘要:
转自对C语言中sizeof细节的三点分析1.sizeof是运算符,跟加减乘除的性质其实是一样的,在编译的时候进行执行,而不是在运行时才执行。那么如果编程中验证这一点呢?ps:这是前两天朋友淘宝面试的一道题,北庚理解:#include using namespace std; int main(){ ... 阅读全文