Libraries: The class to create the ring buffer - page 2

 
//--- buffer initialisation method:
bool Init(                  // returns false on error, true on successful execution
   int    size,             // ring buffer size
   double vo lue=EMPTY_VALUE // value for filling empty buffer cells
   );

Not critical, just for the sake of order.

Both in the description and in the code.

I really liked it. I compared it with my own implementation "head-on" - heaven and earth.

Simple and convenient. Thank you.

 
fyords:

Not critical, just for the sake of order.

Both in the description and in the code.

I really liked it. I compared it with my own implementation "head-on" - heaven and earth.

Simple and convenient. Thank you.

Thanks, I saw it too. There are typos in some places, not only here. I'll fix it after the holidays.

Here is another variant of the ring buffer.

 

Lizar:

...

Here is another variant of the ring buffer.

Yes, thanks, I've seen it, but there the buffer of constant size is 256, and I need much less, that's why I chose this class.

Maybe this one will come in handy someday.

 
fyords:

Yes, thanks, I've seen it, but it has a constant buffer size of 256, and I need much less, that's why I chose this class.

Maybe this one will come in handy someday.

Ok.
 

Thanks a lot! I "killed" the day on arrays until I remembered your research with the ring buffer:)

"May Success accompany you!!!"