47int main(
int argc,
char *argv[])
64 cerr <<
"Error: n must be a positive integer." << endl;
68 unsigned int t = std::time(0);
84 cout << argv[0] <<
" " << n <<
" " << t << endl;
88 for (
int i = 0; i < n; i++)
91 cout << q.
rear() <<
" ";
98 cout << q.
front() <<
" ";
Core header for the Aleph-w library.
Dynamic queue of elements of generic type T based on single linked list.
T & put(const T &data)
The type of element.
T get()
Remove the oldest item of the queue.
T & front()
Return a modifiable reference to the oldest item in the queue.
T & rear()
Return a modifiable reference to the youngest item in the queue.
bool is_empty() const noexcept
Return true if this is empty.
Main namespace for Aleph-w library functions.
Dynamic queue implementation based on linked lists.