When you overload the subscript operator, remember that the non-const version of the overloaded operator should return an object by reference, not by value. Otherwise, you won’t be able to use it in assignment expressions:
class IntArray{private://