v[0] = "a" assign a to index 0 of my vector v. I've tried looking this topic up but its all just confusing if someone could just help me understand how this works I'd appreciate it.
std::string myStringVector::operator[]( std::size_t index ) const { // return a value (a copy)
return base[index] ;
}
std::string& myStringVector::operator[]( std::size_t index ) { // return an object (a reference)
return base[index] ;
}