iggyentity
Programmer
When i overload the operator [] for a vector is there any better way of using it inside the class definition itself ie.
Class Dataset
......
int& operator[](int x){
return vector[x];
}
bool compare(int position, int variable){
return operator[](position)==variable // is there any
//better way than
// this
}
Class Dataset
......
int& operator[](int x){
return vector[x];
}
bool compare(int position, int variable){
return operator[](position)==variable // is there any
//better way than
// this
}