Discussing the article: "From Basic to Intermediate: Queues, Lists, and Trees (VI)"

 

Check out the new article: From Basic to Intermediate: Queues, Lists, and Trees (VI).

In this article, we will return to the tree implementation. Now that we are familiar with the basic principles of constructors and destructors, we can finally fix the code presented in the previous article. Get ready for a real adventure in MQL5 programming.

In the previous article on this topic, “From Basic to Intermediate: Queues, Lists, and Trees (V)”, we discussed the start of a basic implementation of a generic tree. However, we ran into a problem that could not be resolved without first explaining certain concepts. These concepts were discussed in the last three articles, whose main purpose was to show and demonstrate how class objects are created and destroyed.

Without this understanding of constructors and destructors, it is practically impossible to understand why both the code we have already written and the code we are yet to write will run without errors. However, if you try to modify it—whether for educational purposes or to adapt it for other tasks—you may end up with code that still produces errors after execution has completed.


Author: CODE X