how to point to a list item
-
class CData { // members CData* pChildList; } CList* pDataList, pTempList; pTempList = pDataList->GetHead()->pChildList; //how to correct this line? How can I make pTempList to point to pChildList? :mad: :mad: :mad: :mad: :mad:
Change 'class CData' to 'struct CData' or make pChildList a public member. Members of classes are private by default, while default struct members access is set to public. Tomasz Sowinski -- http://www.shooltz.com.pl
-
Change 'class CData' to 'struct CData' or make pChildList a public member. Members of classes are private by default, while default struct members access is set to public. Tomasz Sowinski -- http://www.shooltz.com.pl
-
the class CData is public alright?. the compiler gave this error msg: error C2582: 'operator =' function is unavailable :confused:
Change your variable declaration to:
CList* pDataList, pTempList;
to
CList* pDataList, *pTempList;
pTempList without asterisk declares object, not a pointer to an object. Tomasz Sowinski -- http://www.shooltz.com.pl