Hello everybody,
I need to implement a circular buffer and im clue less . . .HELP me:'(

Recommended Answers

All 3 Replies

THanks a bunch . . btw ive read the article and the problem is implementation . . actually i dont have a strong programing background and i need a C reference implementation . . but still thanks alot

Try drawing it out on paper first to help you visualize what you're trying to do. Believe me, it helps. For a more hands-on approach, you can try reading an article like this:
http://www.vias.org/cppcourse/chap20_05.html

It gives it in C++, but it does a decent job at explaining how the buffers work with the two pointers (well, in this case, I'd guess you'll be implementing them as indices).

Be a part of the DaniWeb community

We're a friendly, industry-focused community of developers, IT pros, digital marketers, and technology enthusiasts meeting, networking, learning, and sharing knowledge.