prg_vector_remove_unordered()

Abstract

Removes an element at the specified position in a vector, without preserving the order of the remaining elements.

Syntax

prg_vector_remove_unordered (vector_ptr, pos_index)
Argument Type Description
vector_ptr PrgT_Vector * the vector of interest
pos_index unsigned long the position of the element to be removed

Return Type

void *

The address of the element that is removed

prg_vector.h

Details

The specified position must be within the bounds of the vector (i.e., it must be greater than or equal to 0 and less than the number of elements in the vector). Otherwise a NIL pointer is returned, and an error might be generated (depending on whether the application has enabled diagnostic error reporting). Potentially, if the vector has been sufficiently reduced, certain memory resources might be released. The address of the element in the specified position is returned.

Note: This function might change the order of the remaining elements in the vector, so care must be take if you use this function while iterating over the elements of the vector.

本站文档由 北京智网畅联科技有限公司 整理、翻译并提供 · Documentation compiled and provided by Beijing ZNetLink Technology Co., Ltd.

交流群 · QQ Group:OPNET/智网妙算网络仿真交流群(群号 486383494)

原文档 © 2017 Riverbed Technology · 本站为公益翻译,由 AI 辅助完成,请仔细甄别

Original documentation © 2017 Riverbed Technology. Community translation, AI-assisted. Contact: jiazequn@znetlink.com