stl
functors and object inheritance
A brief outline: I have a base class that builds some data objects.I then have a child class that inherits all the public methods and pointers to objects from the base class.[详细]
2023-04-05 14:38 分类:问答Pointer problem using Vector containing structs
I am currently really stuck on how to solve the following problem: struct node { int a; node* b; } I will have two root nodes without parents and then to more nodes pointing to their parents[详细]
2023-04-05 13:10 分类:问答Is stl vector concurrent read thread-safe?
I am working on a application where huge number of threads are expected to iterate over set of string values and try to match it\'s own data with the data available in the list.[详细]
2023-04-05 08:15 分类:问答How to write a different version of stl algorithms in c++?
For practice, I wrote some template functions whose names are the same as the stl algorithms. But my code can not compile[详细]
2023-04-05 03:44 分类:问答Correct way to return stl map by reference / Is this behavior well defined?
I have 2 classes and one of them has map<string, vector<string> >I want to be able to use this in other class. Here is my code:[详细]
2023-04-05 03:15 分类:问答Returning an empty vector of strings if key is not found
I know it is a very bad idea, so other suggestions on how to do it efficiently will be well-received.[详细]
2023-04-05 01:18 分类:问答Header-only C++ library (GLM) doesn't compile with Android-NDK
I want to use the GLM (glm.g-truc.net) header-only C++ library in an Android NDK project, but I get compile errors. In the Android.mk, I\'ve added the header search path[详细]
2023-04-04 23:28 分类:问答Is it good practice to return references to iterators? (Does it even make sense)?
I\'m not sure if this is a legit thing to do here - Returning an iterator by reference: vector::iterator& getElement(cons开发者_运维问答t char* name) {...}[详细]
2023-04-04 23:28 分类:问答How to iterate/count for a multimap<string,string>
My class is like this: class Outgoing { multimap<string,string> outgoing; public: void makeConnection(string key, string value)[详细]
2023-04-04 18:55 分类:问答BST implementations in STL
C++ STL \"set\" and \"map\" support logarthmic worst case time for insert, erase, and find operations. Consequently underlying implementation is[详细]
2023-04-04 17:29 分类:问答