Discussing the article: "From Basic to Intermediate: Struct (VII)"

 

Check out the new article: From Basic to Intermediate: Struct (VII).

In today's article, we will show how to approach solving problems related to structuring different elements and creating simpler and more attractive solutions. Although the content is oriented toward learning and, therefore, does not constitute production code, it is essential to thoroughly understand the concepts and knowledge that will be covered here. In this way, in the future we will be able to follow the codes we will present.

I understand that this topic, covered in our articles, may seem excessive to many. However, it is worth remembering that our goal is to explain things in such a way that in the future there will be no need to clarify certain details that, in my view, are trivial. But since most of you use these articles to learn from the experience and knowledge of other programmers, everything I can convey to you at the beginning will greatly assist you in the future, dear readers.

It is not enough to simply see working code; one must understand why it works and, if necessary, know how to adapt an implementation made by another programmer to suit our needs. To do this, it is necessary to know these concepts and understand how they can be applied.

As in the previous article, we began implementing something quite interesting to better understand how structures can be used within other structures, and perhaps you were intrigued by the outcome of the last code. This happened because we used a structure created for one purpose and ended up being able to apply it to another. In this case, the data originally had a double type, but in the end we were able to use data of any type.

However, what we showed is not what we wanted to achieve. For that, we need to advance a little further. But all this effort will pay off and be rewarded in the future. I promise. So, let us continue from where we left off in the previous article.


Author: CODE X