原因:函数内声明变量与参数名相同。 如: void print(int hello) { int hello; std::cout << hello << std::endl; } 解决办法:改变参数参数名或者局部变量名