Looking at the other questions regarding error C2106, I am still lost as to what the issue is with my code. While compiling I get the following errors:
c
Your function MyVector::at(unsigned) is probably not correctly declared and looks like this:
T MyVector::at(unsigned i) { /* implementation detail */ }
What you want is for it to look like this:
T& MyVector::at(unsigned i) { /* implementation detail */ }
Notice the reference parameter (&), which will return whatever element by reference and allow the expression to be used as an l-value.
The real question is why aren't you use std::vector instead?