简体   繁体   中英

Which STL Container will be good to store millions of user define(class) data?

Suppose we've millions of custom data that need to be stored and search later these which STL will be good? let's say

class A{ 
    public:
      int i;
      float f;
      string s;
};

We need to to store the objects of class A.

Which STL Container will be good to store millions of user define(class) data?

All of them, except for std::array .

and search later

Depends on the kind of searching. The associative containers have efficient lookup operations.

The technical post webpages of this site follow the CC BY-SA 4.0 protocol. If you need to reprint, please indicate the site URL or the original address.Any question please contact:yoyou2525@163.com.

 
粤ICP备18138465号  © 2020-2024 STACKOOM.COM