stl
Name a good guide for the implementation of an STL compatible sequence container)
I\'d like to implement a sequence container with the bells and whistles required for an STL class - for example, my own deque class that can use all of the STL algorithms and utilities that the nor开发[详细]
2023-04-03 07:59 分类:问答function pointer to a function which has variable argument list
Can we have a function pointer which points to a function which use a varying argument list? For example, lets say i need to select a function among a number of functions based on some input T \'inpu[详细]
2023-04-03 07:31 分类:问答A vector or multimap dilemma
I have a dilemma of whether to have a multimap <int key, int value> or maintain a vector containing a vector of all values corresponding to int key.[详细]
2023-04-03 06:36 分类:问答Do you have to implement multiple iterators in a STL-like class?
I\'m quite familiar with the STL and how to use it.My question is... If I were to implement my own开发者_运维百科 STL container type, how are the internal iterators defined? STL classes tend to have[详细]
2023-04-03 06:08 分类:问答for(int i=0;i<myVector.size();++i) How many times is size() called?
If i have a myVector which is a STL vector and execute a loop like this: for(int i=0;i<myVector.size();++i) { ... }[详细]
2023-04-03 02:05 分类:问答When is multimap preferred over map?
Can anyone please tell me that when do we prefer multimap开发者_开发百科 over map?You\'d use a multimap when you want to allow the same key values in your map.[详细]
2023-04-02 22:31 分类:问答Why isn't std::find() using my operator==?
In the following snippet of code, I\'ve overloaded the operator== to compare my 开发者_JAVA技巧pair type with string.But for some reason, the compiler isn\'t finding my operator as a match for the fin[详细]
2023-04-02 16:45 分类:问答How do I loop through results from std::regex_search?
After calling std::regex_search, I\'m only able to get the first string result from the std::smatch for some reason:[详细]
2023-04-02 15:14 分类:问答what does list/map return when insert failed?
when insert new element to list/map, it returns the iterator pointed to the newly added element. But if insert failed, what does list/map return? I have read the referen开发者_开发百科ces, when failed[详细]
2023-04-02 10:34 分类:问答Efficiency of std::copy vs memcpy [duplicate]
This question already has answers here: Is it better to use std::memcpy() or 开发者_运维知识库std::copy() in terms to performance?[详细]
2023-04-02 05:59 分类:问答