cxx-shadows-parameter

2020-04-09  本文已影响0人  _Rango_

在cxx中写了类函数,编译报错:

error: declaration of 'str info' shadows a parameter

发现是因为局部变量info和参数名冲突引起的。

参考资料:

  1. https://blog.csdn.net/rdgfdd/article/details/79597378
  2. https://blog.csdn.net/huangyabin001/article/details/42488511
上一篇 下一篇

猜你喜欢

热点阅读