Function rc_vector_ones¶
Defined in File vector.h
Function Documentation¶
-
int rc_vector_ones(rc_vector_t *v, int length)¶
Resizes vector v and fills with ones.
Any existing memory allocated for v is freed if necessary to avoid memory leaks. It is not necessary to call rc_alloc_vector before this.
- Parameters
v – Pointer to user’s rc_vector_t struct
length – [in] Length of vector to allocate memory for
- Returns
Returns 0 if successful, otherwise returns -1.