It can't be reassigned to another instance? (If I recall correctly that's the usual practice in Java.)
It can't be reassigned to another instance? (If I recall correctly that's the usual practice in Java.)
You can reassign pointers, but not references. In C++ a reference is just an alias.
OK, thanks again.
Lists have higher overhead per-item and are worse for the cache performance, and worse for memory fragmentation, than vectors.
It is thus preferable to use a vector rather than a list if you don't need to insert or remove items anywhere but the end. So you may find that you get better performance with a list of vectors, or a vector of lists, or even a vector of vectors.
My homepage
Advice: Take only as directed - If symptoms persist, please see your debugger
Linus Torvalds: "But it clearly is the only right way. The fact that everybody else does it some other way only means that they are wrong"
Why do people never talk about 'valarray's ? I've read very contradictionnary articles/posts about it. I think it is much faster than vector since there is no or less memory management and overhead, but the valarray does not seem to be so popular.
An argument for me to use valarrays is the slicing we can perform. We can get column and row vectors, both at (approximately) the same speed. This is not possible with a vector of vectors I think.