Hi there
Could someone please be so kind as to explain what i am doing wrong .
I am making a list class for use in a little card game and i want to
overload the [] operator.
In the .h file i do like this:
class TListt{
private:
static TListt* Shared;
int TheEnd;
TCard** Lst;
protected:
public:
//Other functions functions
TCard* operator[] (unsigned Index) {return Lst[Index];}
bool __fastcall AddShared();
};
in the .cpp file i have a function where i try to use the
operator but i recive the error that TListt can't be converted to TCard*
WHY ?? and how do i solve it ??
bool __fastcall TListt::AddShared()
{
TCard* R = Shared[0]; //<<<<<<<<<<<<<<<<<<<
//........Snip
Thanks in advance
Asger
Asge...@get2net.dk