0
我将CTypedPtrList转换为指向对象的指针的CArray。如何使用qsort对CTypedPtrList进行排序?
为此我添加了下面的代码。
typedef CTypedPtrList<CPtrList, CMyList*> CTagInfoList;
CMyInfoList* myList;
CArray<CMyList* ,CMyList*> arr;
,,
,,
POSITION pos = myList->GetHeadPosition();
while(pos != NULL){
CMyList* pObj = (CMyList*)myList->GetNext(pos);
arr.Add(pObj);
}
如何使用指向对象的指针CArray调用qsort。
可能的复制[如何排序用户定义类型的CArray?](https://stackoverflow.com/questions/244487/how-do-i-sort-a-carray-of-a-user-defined-type) –
I '去过 用MFC进行二十年的编程。我几乎从未使用过Microsoft容器。请考虑转移到[C++标准库](https://en.wikipedia.org/wiki/C%2B%2B_Standard_Library)。 – lakeweb