write a ring-buffer
Anonymous
I used a static array, with size 1K (power of 2), and r/w indexes. I was a little sloppy with my index manipulations, and conditions for full/empty RB's. Google any article about this, and just slam down the code.
Check out your Company Bowl for anonymous work chats.