在 c++ 中使用 CList -无法理解
我搜索了一个使用 CList 的示例程序。但我找不到它。我得到了一些关于 CList 的基本定义(行为类似于双向链表的模板类)..并用于存储聚合数据..第一个参数由列表内部存储。.我看不到列表中存储了哪些元素以及如何检索它。
RsData Data; //object of class RsData
RsEvent* Event;//pointer to class RsEvent
CList<Event*,Event*> EventQueue;
Data.EventQueue.RemoveAll();
//removing the attributes and methods of the class RsEvent stored in the list.
I searched for a sample program to work on with the CList.But i could not find it.I got some basic definitions about the CLists(template class that behaves similar to the doubly linked lists).. and is used to store the aggregate data..The 1st argument is stored internally by the list..I could not see what elements are stored in the list and how to retrieve it.
RsData Data; //object of class RsData
RsEvent* Event;//pointer to class RsEvent
CList<Event*,Event*> EventQueue;
Data.EventQueue.RemoveAll();
//removing the attributes and methods of the class RsEvent stored in the list.
如果你对这篇内容有疑问,欢迎到本站社区发帖提问 参与讨论,获取更多帮助,或者扫码二维码加入 Web 技术交流群。
绑定邮箱获取回复消息
由于您还没有绑定你的真实邮箱,如果其他用户或者作者回复了您的评论,将不能在第一时间通知您!
发布评论
评论(1)
所以文档是 MSDN 上的 CList
那里有一个链接 COLLECT 示例:说明 MFC 集合类
I'我不确定如何找不到该文档,所以也许您的问题需要澄清。
该列表提供了前/后插入和查找,以及迭代方法。
So the doc is CList on MSDN
And there is a link there for the COLLECT Sample: Illustrates MFC Collection Classes
I'm not sure how this doc was not found, so perhaps your question needs to be clarrified.
The list offers front/back inserting and looking, aswell as methods for iterating.