const 函数参数

void func(int value);

这样的函数,不可以这样子使用: 

const int value =100;

func(value );

因为func里面可能会对value进行更改,将const类型传入,里面的代码可能无法运行。 

原文地址:https://www.cnblogs.com/jilichuan/p/4002713.html