Extending std::list

后端 未结 8 2115
小蘑菇
小蘑菇 2021-01-31 13:00

I need to use lists for my program and needed to decide if I use std::vector or std::list. The problem with vector is that there is no remove method and with list that there is

8条回答
  •  执笔经年
    2021-01-31 13:11

    There is no need to call destructor of std::list , because you already derive from std::list when destructor called for myList automatically std::list destructor will be called.

提交回复
热议问题