FileWrite(_file_handle,S);
FileWriteString is a binary file function.
Use FileWrite for csv files.
(oops, I didn't see Slawa's answer...)
Use FileWrite for csv files.
(oops, I didn't see Slawa's answer...)
Thanks!
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
int _file_handle;
string S = "";
.
.
.
.
.
//////////////////////////////////////////////////////////////////////
int wlog(string S)
{
//--update file
_file_handle=FileOpen("mylogfile.csv",FILE_CSV|FILE_WRITE,';');
if (_file_handle<1)
Print("Can not open file error - ",GetLastError());
else
{
FileWriteString(_file_handle, S, 80);
FileClose(_file_handle);
}
//--end of updating file
}
.
.
.
.
S = "test";
wlog(S);
This gives the following error:
attempt to write binary data into CSV file