overloading assignment operator With subscript operator
问题 I overloaded both subscript operator and assignment operator and I am trying to get right value to assignment operator example Array x; x[0]=5; by overloading subscript operator i can get value 0 but when i overload assignment operator it does the assignment but it doesn't use my overloaded function because vaiable 2 should have value 5. class Array { public: int *ptr; int one,two; Array(int arr[]) { ptr=arr; } int &operator[](int index) { one=index; return ptr[index]; } int & operator=(int x