Diffstat (limited to 'noncore/apps/opie-reader/my_list.h') (more/less context) (ignore whitespace changes)
-rw-r--r-- | noncore/apps/opie-reader/my_list.h | 12 |
1 files changed, 12 insertions, 0 deletions
diff --git a/noncore/apps/opie-reader/my_list.h b/noncore/apps/opie-reader/my_list.h index f180d3d..52e6472 100644 --- a/noncore/apps/opie-reader/my_list.h +++ b/noncore/apps/opie-reader/my_list.h @@ -3,2 +3,6 @@ +#ifndef NULL +#define NULL 0 +#endif + template<class T> @@ -32,2 +36,10 @@ class CList T& last() { return back->data; } + T pop() + { + T data = front->data; + node* n = front; + front = front->next; + delete n; + return data; + } T* operator[](int n) |