diff --git a/Array2D.hpp b/Array2D.hpp index 553869d..f546746 100644 --- a/Array2D.hpp +++ b/Array2D.hpp @@ -33,7 +33,7 @@ public: std::cout << '\n'; } } - int *operator[](int i) // 重载[],允许暴露内部数据 + int *operator[](int i) const// 重载[],允许暴露内部数据 { if (i < 0 || i >= row) throw std::out_of_range{"数组行下标越界\n"};