1、使用const可以避免无意中修改数据的编程错误。 2、使用const使函数能够处理const和非const实参,否则将只能接受非const数据。 3、使用const引用使函数能够正确生成并使用临时变量。