Simple Circular Buffer C++