Ring buffer in c. I used a std::unique_ptr in the example, but a C-style array or std::array coul...