Download MetaTrader 5

code needed for FILE WRITE / file APPEND in text file as well as csv file

To add comments, please log in or register
Selvan
53
Selvan  

DEAR SIR,

Please give me simplest sample code for , file write , file  append ( one samples for text file  , and one sample for csv file )

thanks you sir

Carl Schreiber
7355
Carl Schreiber  
      string row = "something to write\n";
      int fH = FileOpen(fName,FILE_READ|FILE_WRITE);
      FileSeek(fH,0,SEEK_END); 
      FileWriteString(fH, row, StringLen(row) );
      FileClose(fH);

Your request "Please give me .." sounds more rude than a beggar's one: "Sir, do you have a dime?".

Normally I don't react on that!

If you seek a bit you woould find a lot of examples in the reference or the docs and if you seek a bit more you would find a lot free code..

Well it's Christmas time.

To add comments, please log in or register