
Classes with No Class 131
89 inc_index(in_index);
90 }
91 // Return first element from the queue
92 int get(void)
93 {
94 // Value to return
95 int value = data[out_index];
96
97 inc_index(out_index);
98 return (value);
99 }
100 };
101
102 int main()
103 {
104 // Queue to play around with
105 queue a_queue(30);
106
107 // Loop counter for playing with the queue
108 int i;
109
110 for (i = 0; i < 30; ++i)
111 a_queue.put(i);
112
113 // Create a new queue, same as the current one
114 queue save_queue(20);
115 save_queue = a_queue;
116
117 std::cout << "Value is " <<
118 a_queue.get() << std::endl;
119
120 std::cout << "Value is " <<
121 a_queue.get() << std::endl;
122
123 std::co ...