Discussing the article: "From Basic to Intermediate: Operator Overloading (VI)"

Check out the new article: From Basic to Intermediate: Operator Overloading (VI).

Here, we implement deletion using operator overloading. Without a doubt, many people will have to spend quite a bit of time studying this article to fully grasp everything that will be covered here. I want to remind you that what we're about to see is just a small and insignificant part of what we call programming.

Thanks to what we did in the previous article, we already have mechanisms for adding elements to and reading elements from a linked list. However, what has been implemented there is NOT ENOUGH to produce a fully functional list. First, because we don't yet have a mechanism for deleting elements. Second, when we read the list, it is destroyed, and we need to fix that. Third, we cannot access its elements randomly, since this mechanism has not yet been implemented.

Regarding this third point, the article “From Basic to Intermediate: Operator Overloading (IV)” explained a small detail that needs to be taken into account. However, there is a way to get around this minor inconvenience. To do this, we'll use a different technique, although it doesn't quite work the way you might imagine. Remember that everything explained in the article mentioned above still applies. Nevertheless, we can organize the code in such a way as to implement this third point.

All right, then let's start with the simplest thing and gradually move on to more complex topics. Since the second and third points are closely related, in a sense they can be viewed as a single task. Although, in reality, it's not even a challenge, and you'll soon see why. This will be a little easier to understand than the part about the deletion of list elements through operator overloading.


Author: CODE X