I have written a function
CList<GroupData *,GroupData *> funcationName(CString arg1,CString arg2);
I am connecting to database and adding database results in GroupData Bean class. like this:
GroupData* grpData;
grpData->setGRGRID(groupid);
after that I am adding grpData in CList grpList;
grpList.AddHead(grpData);
I am getting compilation error
can not access private member of cobject class
in compiler generated file afxtempl.h.
My class have a public constructor.
You are trying to return a CList object in your function:
I think the best option for you will be to change the function signature like this:
Then, you will need to initialise an empty CList in the calling function and pass it as the third parameter to the above function