Skip to content

Queue_GetValuePos

Sancky edited this page Sep 26, 2022 · 3 revisions

Description

Get the position of an element from an queue.

Syntax

Queue_GetValuePos(queue, value)

Example

new Queue:queue<10>;

Queue_InsertValue(queue, 1);
Queue_InsertValue(queue, 5);
Queue_InsertValue(queue, 10);
Queue_InsertValue(queue, 15);

printf("The position of the element 10 is %d.", Queue_GetValuePos(queue, 10));

Returns

Returns the position of the element, otherwise INVALID_QUEUE_VALUE.

Clone this wiki locally