Does the C++ standard library have a set ordered by insertion order?

前端 未结 6 364
春和景丽
春和景丽 2021-01-11 09:30

Does the C++ standard library have an \"ordered set\" datastructure? By ordered set, I mean something that is exactly the same as the ordinary std::set but that

6条回答
  •  执念已碎
    2021-01-11 10:14

    Yes, it's called a vector or list (or array). Just appends to the vector to add element to the set.

提交回复
热议问题