常量相对于“变量”,在程序中是不可改变的!!
关键字:const;
声明常量的语句:const 数据类型 常量名=值;如 const double PI=3.14159265
在声明常量时,必须赋值,否则编译不能通过。
常量相对于“变量”,在程序中是不可改变的!!
关键字:const;
声明常量的语句:const 数据类型 常量名=值;如 const double PI=3.14159265
在声明常量时,必须赋值,否则编译不能通过。
转载于:https://www.cnblogs.com/lxjie/archive/2013/01/24/2875621.html