You are missing trading opportunities:
- Free trading apps
- Over 8,000 signals for copying
- Economic news for exploring financial markets
Registration
Log in
You agree to website policy and terms of use
If you do not have an account, please register
Check out the new article: From Basic to Intermediate: Array (II).
There are essentially two ways to declare an array. One is by declaring a static array, and the other is by declaring it as a dynamic array. While in practice, understanding each type is relatively straightforward, there are certain subtle nuances that can complicate or even prevent a clear understanding of what a dynamic array and a static array really are. Especially when considering other programming languages, such as C and C++. However, even here in MQL5, there may be moments where you find yourself somewhat unsure. This is because the fundamental and essential difference between a static and a dynamic array lies in the ability of the latter to change size during the execution of the code.
Thinking about it this way, it seems simple enough to classify an array as either dynamic or static. However, it's important to remember that a string is also an array. Though it's a special kind of array. This makes it complicated to classify it as strictly static or dynamic. Nonetheless, let's set this fact aside. We will not delve into the string type directly. Thus we will avoid confusion and to ensure we develop a clear understanding of this topic.
Author: CODE X