c++ 学习基础1,基本的关键字命名规则我还真不是特别清楚const 和 #define 区别

c++ 学习基础1,基本的关键字命名规则我还真不是特别清楚const 和 #define 区别

1、统一风格命名规则,
int myAge 驼峰式的
int iMyAge 微软的匈牙利命名方法, i 是变量类型int的缩写
int MyAge pascal命名方法

c++ 学习基础1,基本的关键字命名规则我还真不是特别清楚const 和 #define 区别
使用 const 作为常量定义便于编译纠错,不用#define(不利于编译纠错)
const double PI=3.14

c++ 学习基础1,基本的关键字命名规则我还真不是特别清楚const 和 #define 区别
转义字符