|
creates a (circular) queue, best used if the size will be fixed or will not be increased that much
- Parameters
-
queue | pointer to the new queue |
initsize | initial number of available element slots |
sizefac | memory growing factor applied, if more element slots are needed |
frees queue, but not the data elements themselves
- Parameters
-
clears the queue, but doesn't free the data elements themselves
- Parameters
-
inserts element at the end of the queue
- Parameters
-
queue | queue |
elem | element to be inserted |
removes and returns the first element of the queue
- Parameters
-
returns the first element of the queue without removing it
- Parameters
-
returns whether the queue is empty
- Parameters
-
returns the number of elements in the queue
- Parameters
-
|