Well I'm not allowed to use STL in this class
and I tried gdb but it doesn't give me much information and I'm not sure how to interpret what it does give me. What's the RAII idiom? This is what I got in gdb:
Code:
GNU gdb Red Hat Linux (6.3.0.0-1.132.EL4rh)
Copyright 2004 Free Software Foundation, Inc.
GDB is free software, covered by the GNU General Public License, and you are
welcome to change it and/or distribute copies of it under certain conditions.
Type "show copying" to see the conditions.
There is absolutely no warranty for GDB. Type "show warranty" for details.
This GDB was configured as "x86_64-redhat-linux-gnu"...Using host libthread_db library "/lib64/tls/libthread_db.so.1".
(gdb) run
Starting program: /afs/engin.umich.edu/u/l/m/lmvent/eecs-281/proj1/a.out
Reading symbols from shared object read from target memory...done.
Loaded system supplied DSO at 0xffffe000
*** glibc detected *** free(): invalid pointer: 0x0804b094 ***
Program received signal SIGABRT, Aborted.
0xffffe405 in __kernel_vsyscall ()
(gdb) backtrace
#0 0xffffe405 in __kernel_vsyscall ()
#1 0xf7dd57a5 in raise () from /lib/tls/libc.so.6
#2 0xf7dd7209 in abort () from /lib/tls/libc.so.6
#3 0xf7e0971a in __libc_message () from /lib/tls/libc.so.6
#4 0xf7e0ffbf in _int_free () from /lib/tls/libc.so.6
#5 0xf7e1033a in free () from /lib/tls/libc.so.6
#6 0xf7fa09f1 in operator delete () from /usr/lib/libstdc++.so.6
#7 0x08048c1c in Queue::Purge (this=0xffffd7a0) at queue.cpp:26
#8 0x08048cac in ~Queue (this=0xffffd7a0) at queue.cpp:38
#9 0x0804899d in main () at test.cpp:29