I have made my own vector template, `operator[]` part of it :

```
template <class T>
T& vector<T>::operator[](unsigned int index)
{
    return m_Data[index];
}

```

I use this code in class copy constructor

```
Track::Track(const Track& src)
{
    for(unsigned int i = 0; i < src.sorted.size(); i++)
        AddCar(src.sorted[i]->rz, src.sorted[i]->owners.back()->name, src.sorted[i]->owners.back()->surname);
}

```

and I am getting an error `'no match for operator[] (operands types are const vector<Track*> and unsigned int)'`

I tried to overload `operator[]` with `const` keyword:

```
const T& operator[](unsigned int);

```

but that gave me a different error: `const T& operator[](unsigned int); cannot be overloaded`

What could be the cause here?