C++深度解析(4)—内联函数

1.常量与宏回顾函数 C++中的const常量能够替代宏常数定义,如: const int A= 3; ←→ #define A 3  C++中是否有解决方案替代宏代码片断呢? 2.内联函数 优化 C++中推荐使用内联函数替代宏代码片断  C++中使用inline关键字声明内联函数  inline int func(int a, int b)    {       return a< b? a: 
相关文章
相关标签/搜索