VF_insertVD_insertVE_insert
VCF_insertVCD_insertVCE_insert
VPF_insertVPD_insertVPE_insert
VI_insertVBI_insertVSI_insertVLI_insertVQI_insert
VU_insertVUB_insertVUS_insertVUL_insertVUI_insert
FunctionInsert an element into a vector
Syntax C/C++#include <VFstd.h>
void VF_insert( fVector X, ui size, ui pos, float C );
C++ VecObj#include <OptiVec.h>
void vector<T>::insert( ui pos, const T& C );
Pascal/Delphiuses VFstd;
procedure VF_insert( X:fVector; size, pos:UInt; C:Single );
DescriptionThis is one of the few functions where the input vector is changed itself (instead of being mapped onto an output vector). A new element is inserted at the position pos and has the value C. Elements before pos are unchanged, elements from pos on are shifted one position higher; the last element is lost. (If you wish to save the last element, choose size big enough to have a dummy element at the end of the vector; now it will be the dummy that gets lost.)
Error handlingnone
Return valuenone
See alsoVF_delete,   VF_rotate

VectorLib Table of Contents  OptiVec home