C ++ Vector类似C#中的类 [英] C++ Vector like class in C#
本文介绍了C ++ Vector类似C#中的类的处理方法,对大家解决问题具有一定的参考价值,需要的朋友们下面随着小编来一起学习吧!
问题描述
C#中C ++ std::vector
的类似类是什么?
What is the analogous class of C++ std::vector
in C#?
我想要一个在其中保留内部数组并支持在O(1)
时间后方插入的类.
I want a class where it keeps an internal array inside and supports insertion at the back in O(1)
time.
推荐答案
下面是一个列表,其中包含一些C++
/C#
容器,它们在大致上彼此等效(不是完全替代) :
Here is a list with some C++
/ C#
containers that are roughly equivalent (not exact replacements) to each other:
-
std::vector
->std::list
->std::map
->std::set
->std::unordered_set
->std::multiset
->std::unordered_map
-> 查看全文