|
-
March 11th, 2008, 02:05 PM
#8
Re: Circular Buffer
A circular buffer is essentially just an array that when you get to the end of the array, you start writing at the beginning again. You'll need something to keep track of your current position, the length of the array, and something to keep track of the last read position (to prevent overwrite, if neccessary).
I'll leave the implementation up to you, as this sounds a bit like a homework problem.
Posting Permissions
- You may not post new threads
- You may not post replies
- You may not post attachments
- You may not edit your posts
-
Forum Rules
|
Click Here to Expand Forum to Full Width
|