Mark Bracey wrote:
> TValue * operator [](int i) {return(TValue*)(FValueList->Items[i]););
This looks correct.
> Value = List[i];
> What am I doing wrong?
It's just how you're using your list. Presumably, List is a pointer
to a TList, so what you really need to do is this:
Value = (*List)[i];
...to dereference the pointer, and then call the operator[] on the
object.
So you know why you got the error... the way you wrote it, your code
was trying to dereference the element number [i] in an array of
TLists. So the return value of that expression was a TList*, which
didn't match the TValue * type of "Value". :)
--
Chris (TeamB)