Description | |||||||||||
Adds an object at a specified location to the array, or appends an object to the end of an array.
For example, if you want to insert one integer in an integer array, call the function as follows: ProArrayObjectAdd (&int_array, 0, 1, (void *)&int_val); If you want to insert 3 doubles at the second position in an array of doubles, call the function as follows: ProArrayObjectAdd (&dbl_array, 2, 3, (void *)dbl3_arr); NOTE: Because this call may cause the array to be reallocated, you must pass the address of the array. |
|||||||||||
Synopsis | |||||||||||
#include <ProArray.h> | |||||||||||
ProError | ProArrayObjectAdd | ( | |||||||||
ProArray* p_array | |||||||||||
/* (In) | |||||||||||
The address of the array. | |||||||||||
*/ | |||||||||||
int index | |||||||||||
/* (In) | |||||||||||
The position at which to insert the objects in the array. If you specify a value less than 0 (PRO_VALUE_UNUSED), the function appends the objects to the end of the array. | |||||||||||
*/ | |||||||||||
int n_objects | |||||||||||
/* (In) | |||||||||||
The number of objects to add to the array. | |||||||||||
*/ | |||||||||||
void* p_object | |||||||||||
/* (In) | |||||||||||
The address from which a contiguous set of object data is to be copied into the array. | |||||||||||
*/ | |||||||||||
) | |||||||||||
Returns | |||||||||||
|