prg_vector_set()

Abstract

Places an element into a vector at a specified position, replacing contents already at that position.

Syntax

prg_vector_set (vector_ptr, element_ptr, pos_index)
Argument Type Description
vector_ptr PrgT_Vector * vector of interest
element_ptr void * element to be placed in the vector
pos_index unsigned long position in the vector (zero-indexed)

Return Type

void *

Element previously stored in the specified location

prg_vector.h

Details

The position must be within the bounds of the vector as it currently exists. In other words, the new element cannot be added beyond the end of the vector. The element that is currently being replaced is returned (typically, it is processed in some way or destroyed) by this function.

Position indices are zero-indexed. In other words, the first element has position index 0, the second is 1, and so on.

本站文档由 北京智网畅联科技有限公司 整理、翻译并提供 · 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