stdvector
'std::vector<T>::iterator it;' doesn't compile
I\'ve got this function开发者_开发百科: template<typename T> void Inventory::insertItem(std::vector<T>& v, const T& x)[详细]
2023-01-05 08:03 分类:问答question about std::vector::end()
I recently finished fixing a bug in the following function, and the answer surprised me.I have the following function (written as it was before I found the bug):[详细]
2023-01-05 02:58 分类:问答Prefill a std::vector at initialization?
I want to create a vector of vector of a vector of double and want it to already have (32,32,16) elements, without manually开发者_高级运维 pushing all of these back. Is there a way to do it during ini[详细]
2023-01-02 13:09 分类:问答Weird behavior of std::vector
I have a class like this: class OBJ{...}; class A { public: vector<OBJ> v; A(int SZ){v.clear(); v.reserve(SZ);}[详细]
2023-01-01 21:15 分类:问答A cross between std::multimap and std::vector?
I\'m looking for a STL container that works like std::multimap, but has constant access time to random n-th element. I need this because I have such structure in memory that is std::multimap for many[详细]
2023-01-01 19:33 分类:问答Struct size containing vector<T> different sizes between DLL and EXE
I have this situation where an EXE program imports a DLL for a single function call. It works by passing in a custom structure and returning a different custom structure. Up till now it\'s worked fine[详细]
2022-12-31 18:46 分类:问答Linker error with Duplicated Symbols, SWIG and C++ Vectors
I came across this error trying to compile a shared object from 2 sets of objects.The first set contains one .os object compiled from one cpp file generated by SWIG.The second set is contains all of t[详细]
2022-12-31 11:57 分类:问答passing a class method as opposed to a function in std::sort
Within a class, I am trying to sort a vector, by passing a method of the same class. But it gives errors at the time of compilation. Can anyone tell what the problem is? Thank you![详细]
2022-12-29 17:05 分类:问答C++ User-Defined Vector
How do you declare a vector in c++ while allowing user input to define the vector\'s name? Okay, after reviewing your responses, here is more detail; Here is the error message from VS08 C++ console a[详细]
2022-12-29 02:35 分类:问答returning a pointed to an object within a std::vector
I have a very basic question on returning a reference to an element of a vector . There is a vector vec that stores instances of class Foo. I want to access an element from this vector .( don\'t wan[详细]
2022-12-28 16:42 分类:问答