In Part 3 we expanded on the original buffer and it now supports any type and any size. Our RingBuffer almost behaves like any of the STL types, such as std::vector and I say almost. Consider the following code:
int main()
{
RingBuffer<int, 10> my_buffer;
for (int i = 0; i < 10; ++i)
{
my_buffer.push_back(i);
}
for (auto x : my_buffer) // This line produces an error.
{
std::cout << x << ' ';
}
}
This code should work, but if we actually try to run it we will get a compiler error.
In
In
Hello! If you recall from the previous series, we built a program that handled text input, stored numbers into a vector and performed calculations. However there were some concepts in there that we used, but that I didn’t really explain. I am referring to iterators. In this new series I aim to go over what they are, how they work and how to use them, so get ready because it will be a bumpy ride and as usual, we will have to build our way there because fundamentals are always important.
In 
In your programming journey, have you ever reached a point where you feel overwhelmed with everything a language can do, leaving you unsure of what to learn first or which features are truly important? I find myself in that exact situation. With each new C++ standard, I feel like I’m falling behind. Here we are in 2025, and I’m still trying to master move semantics and how to best use smart pointers. Learning a language with a rich history like C++ can be grueling. I’ve noticed I often get mesmerized by what’s new, shiny, and exciting, causing me to neglect the fundamentals.
That’s what this post is about: practicing some of the fundamentals of the language and its standard library.
In this new series, I will explore the basics of the