Next: , Previous: Reading and writing to a realvec, Up: Realvec

7.3.2 Resizing a realvec

The size of a realvec may be changed dynamically; you may also get the current size.

     // for two-dimensional realvecs

If you do not know how big your realvec should be, use stretchWrite(...). This function checks to make sure that the realvec is big enough; if not, it resizes the realvec (by doubling the size) so that it can store the value. This function is much slower than normal writing.