root/src/queue.h

Revision 5, 286 bytes (checked in by nick, 3 years ago)
Line 
1#ifndef _QUEUE_H_
2#define _QUEUE_H_
3
4class Node
5{
6        public:
7        void *x;
8        Node *next;
9
10        Node() { next = NULL; }
11};
12
13
14class Queue
15{
16        private:
17        Node *head;
18        Node *tail;
19        int size;
20
21        public:
22        Queue(void);
23        ~Queue(void);
24
25        void push(void *r);
26        int pop(void **r);
27        int entries(void);
28};
29
30#endif
Note: See TracBrowser for help on using the browser.