#ifndf _VECTOR_H_
#define _VECTOR_H_
class Vector{
public:
Vector(int size):m_size(size){
m_array = new int[size];
}
~Vector(){
delete m_array;
}
int& operator[](int index){
return m_array[index];
}
private;
int m_size;
int *m_array;
};
#endif
运算符的重载——原型
最新推荐文章于 2023-12-07 11:09:53 发布