Quote:
|
Originally Posted by newdigital
You described that we should write a null character after the last character of data in data type string.
But it was nothing in the examples:
string str1 = "Hello";
So no null.
May be it was for the explanation only?
|
Hi newdigital,
Thank you very much for your question, it's an intelligent one.
This kind of strings (and it's the only kind MQL4 uses) called
Null-terminated strings
The
NULL has putted for you automatically when you used the "string" keyword to create a string type variable.
So you must not add
NULL to the end of your string, because MQL4 will add it automatically.
string str1 = "Hello"; will be presented in the memory like that:
H e l l o NULL