void func(int value);

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

const int value =100;

func(value );

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

相关文章: