list< class A *>升; [英] list<class A*> l;

查看:75
本文介绍了list< class A *>升;的处理方法,对大家解决问题具有一定的参考价值,需要的朋友们下面随着小编来一起学习吧!

问题描述

创建列表时:

list< class A *> l;


如何删除指针包含在l中的所有对象?


感谢您的评论?

When creating a list:
list<class A*> l;

How to delete all the objects whose pointers are contained in "l"?

Thanks for your comments?

推荐答案

*" pub" < pu*@nospam.com> schriebt:
* "pub" <pu*@nospam.com> schriebt:
创建列表时:
list< class A *> l;

如何删除指针包含在l中的所有对象?
When creating a list:
list<class A*> l;

How to delete all the objects whose pointers are contained in "l"?




首先遍历列表并删除每个对象。


一种方法是使用''for''循环。


然后清除列表。

-

答:因为它弄乱了人们通常阅读文本的顺序。

问:为什么顶级发布这么糟糕的事情?

A:热门发布。

问:usenet和电子邮件中最烦人的是什么?



First iterate through the list and delete each object.

One way to do that is to use a ''for'' loop.

Then clear the list.
--
A: Because it messes up the order in which people normally read text.
Q: Why is top-posting such a bad thing?
A: Top-posting.
Q: What is the most annoying thing on usenet and in e-mail?


Alf P. Steinbach< al *** @ start.no>在消息中写道

news:40 ***************** @ news.individual.net ...
Alf P. Steinbach <al***@start.no> wrote in message
news:40*****************@news.individual.net...
*" ;酒馆" < pu*@nospam.com> schriebt:
* "pub" <pu*@nospam.com> schriebt:
创建列表时:
list< class A *> l;

如何删除指针包含在l中的所有对象?
When creating a list:
list<class A*> l;

How to delete all the objects whose pointers are contained in "l"?



首先遍历列表并删除每个对象。 />
一种方法是使用''for''循环。

然后清除列表。



First iterate through the list and delete each object.

One way to do that is to use a ''for'' loop.

Then clear the list.



谢谢! 遍历列表和删除每个指针都很明显。

你是什么意思清除列表?


Thanks! "iterate through the list" and "delete" every pointer is obvious.
What do you mean by "clear the list"?


" pub" < pu*@nospam.com>在留言中写道

news:aQFoc.49713
"pub" <pu*@nospam.com> wrote in message
news:aQFoc.49713


这篇关于list&lt; class A *&gt;升;的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持IT屋!

查看全文
相关文章
登录 关闭
扫码关注1秒登录
发送“验证码”获取 | 15天全站免登陆