hi,
i just want to know that data items are stored in container classes, like vector, map and etc. , by reference or by value.
thanks in advance.
khurram
hi,
i just want to know that data items are stored in container classes, like vector, map and etc. , by reference or by value.
thanks in advance.
khurram
Neither would be the best answer. Vectors, for example, store a stack. The data that you used is passed back to you is reference to an entry in that stack.
I was wondering the same thing that khurram was wondering. So is the whole object placed on the stack or just a pointer to the object? I tend to place whole objects in containers and if the whole thing is sent then maybe I should be storing pointers instead