I see a lot of templates and complicated data structures for implementing a circular buffer.
How do I code a simple integer circular buffer for 5 numbers?
I\
If the size and data type of your buffer are fixed, a simple array is all you need:
int buffer[5];
Add to that a couple pointers:
int* start = &buffer[0]; int* end = &buffer[4]+1; int* input = start; int* output = start;