
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
hello there, I would like to check, how many rows are in a file.
I am working with CSV files.
I have tried "file size", but it gives the size in terms of bites, not rows.
If you are aware of any trick, thanks in advance.
This is for MQL5.
just for fun here is my take on it, but attention, I am not a pro.
when this is finished,
the number of rows will be in the variable cnt.
just for fun here is my take on it, but attention, I am not a pro.
when this is finished,
the number of rows will be in the variable cnt.
hello and thanks.
My interpretation of this:
the function "getCsvLines" can get the number of lines.
When I call the function, I believe I have to provide a number of parameters.
The first one is fName, ok I have this.
But what about the others?
string&[],int,ushort
Please let me know what I should provide for those.
Thanks!!
This function should return the whole file as a string array of lines so and the number of lines for the loop:
PS. Thanks fxsaber :)
I like this style of code.
Which you don’t need anyway just read into a dynamic array and resize as you go until end of file no need to read the file twice as you plan to
oho, cool, may I ask how you work with a "dynamic array"?
You need to read the documentation and learn the language.