Implementacion de cola V. Prueba
cola.h@0:fb57ac8848cf, 2021-11-03 (annotated)
- Committer:
- antonsterling
- Date:
- Wed Nov 03 18:26:30 2021 +0000
- Revision:
- 0:fb57ac8848cf
Implementacion de una cola en C (version Prueba)
Who changed what in which revision?
User | Revision | Line number | New contents of line |
---|---|---|---|
antonsterling | 0:fb57ac8848cf | 1 | #include "mbed.h" |
antonsterling | 0:fb57ac8848cf | 2 | |
antonsterling | 0:fb57ac8848cf | 3 | #ifndef COLA_H |
antonsterling | 0:fb57ac8848cf | 4 | #define COLA_H |
antonsterling | 0:fb57ac8848cf | 5 | |
antonsterling | 0:fb57ac8848cf | 6 | typedef class { |
antonsterling | 0:fb57ac8848cf | 7 | private: |
antonsterling | 0:fb57ac8848cf | 8 | int myqueue[]; |
antonsterling | 0:fb57ac8848cf | 9 | int front; |
antonsterling | 0:fb57ac8848cf | 10 | int rear; |
antonsterling | 0:fb57ac8848cf | 11 | int MAX_SIZE; |
antonsterling | 0:fb57ac8848cf | 12 | } cola; |
antonsterling | 0:fb57ac8848cf | 13 | |
antonsterling | 0:fb57ac8848cf | 14 | |
antonsterling | 0:fb57ac8848cf | 15 | void Queue(int front, int rear); |
antonsterling | 0:fb57ac8848cf | 16 | bool isFull(int front, int rear, int MAX_SIZE); |
antonsterling | 0:fb57ac8848cf | 17 | bool isEmpty(int front); |
antonsterling | 0:fb57ac8848cf | 18 | char enQueue(int value, int front, int rear, int myqueue[]); |
antonsterling | 0:fb57ac8848cf | 19 | int deQueue(int front, int rear, int myqueue[]); |
antonsterling | 0:fb57ac8848cf | 20 | char displayQueue(int front, int rear, int myqueue[]); |
antonsterling | 0:fb57ac8848cf | 21 | |
antonsterling | 0:fb57ac8848cf | 22 | #endif |