-
October 27th, 2011, 04:20 AM
#1
MFC CTypedPtrList in a CTypedPtrList error
I need to store my data in a list of lists as shown in the code
class CMyData
{
public:
CString m_strStuff;
};
typedef CTypedPtrList< CPtrList, CMyData*> CMyDataList;
typedef CTypedPtrList< CPtrList, CMyDataList*> CMyDataListList;
I create a list and add a list to it
CMyDataListList listMyData;
CMyDataList *pList = new CMyDataList;
pList->AddTail( new CMyData );
listMyData.AddTail( pList );
I get the error
Error 1 error C2440: 'return' : cannot convert from 'void' to 'POSITION' c:\program files (x86)\microsoft visual studio 10.0\vc\atlmfc\include\afxtempl.h 1961
I can not see what is wrong, can nayone else? I can do the same with maps in maps or a list in an CTpedArray and all is OK.
Posting Permissions
- You may not post new threads
- You may not post replies
- You may not post attachments
- You may not edit your posts
-
Forum Rules
|
Click Here to Expand Forum to Full Width
|