¡@

Home 

c++ Programming Glossary: capacity

reduce the capacity of an stl vector

http://stackoverflow.com/questions/1111078/reduce-the-capacity-of-an-stl-vector

the capacity of an stl vector Is there a way to reduce the capacity of a.. capacity of an stl vector Is there a way to reduce the capacity of a vector My code inserts values into a vector not knowing.. v Swapping the contents with another vector swaps the capacity. std vector T v .swap v is equivalent to std vector T tmp v..

How to downsize std::vector?

http://stackoverflow.com/questions/253157/how-to-downsize-stdvector

std vector Is there a way to resize a std vector to lower capacity when I no longer need previously reserved space c stl vector.. by Scott Meyers Item 17 Use the swap trick to trim excess capacity. vector Person persons .swap persons After that persons is shrunk..

Critique my non-intrusive heap debugger

http://stackoverflow.com/questions/2835416/critique-my-non-intrusive-heap-debugger

11 class hashtable metadata data size_t used size_t capacity size_t tombstones public size_t size const return used tombstones.. return used tombstones void print const for size_t i 0 i capacity i if data i .in_use printf leaked data i .print hashtable.. printf leaked data i .print hashtable used 0 capacity MINIMUM_CAPACITY data static_cast metadata calloc capacity sizeof..

Iterator invalidation rules

http://stackoverflow.com/questions/6438086/iterator-invalidation-rules

unless the new container size is greater than the previous capacity in which case all iterators and references are invalidated 23.2.4.3..

Choice between vector::resize() and vector::reserve()

http://stackoverflow.com/questions/7397768/choice-between-vectorresize-and-vectorreserve

memory but leaves it uninitialized. It only affects capacity but size will be unchanged. There is no value for the objects..

What XML parser should I use in C++?

http://stackoverflow.com/questions/9387610/what-xml-parser-should-i-use-in-c

chosen LibXML2 Xerces's SAX style API will work in this capacity but LibXML2 is here because it's a bit easier to work with...