c++ (运算符重载 && []运算符重载)

c++ (运算符重载 && []运算符重载)

[]运算符重载,返回数组索引的引用
int& MyArray::operator[](int index)
{
	return this->pAddress[index];
}

posted on 2021-04-23 17:53  lodger47  阅读(89)  评论(0编辑  收藏  举报

导航