Ubuntu 14 を使用していて、ファイルを書き込むスクリプトを作成しようとしていますが5004
、ファイルを開こうとするたびにエラーが発生します。
datetime currtime;
bool newcandle;
string terminal_data_path = TerminalInfoString( TERMINAL_DATA_PATH );
string filename = terminal_data_path + "\\MQL4\\Files\\" + "data.csv";
int filehandle;
filehandle = FileOpen( filename, FILE_WRITE | FILE_CSV );
if ( filehandle < 0 ){
Print( "Failed to open the file by the absolute path " );
Print( "Error code ", GetLastError() );
}
else {
Print( "file opened with sucess" );
}
Ubuntuでこの問題を解決するにはどうすればよいですか?
アップデート
ファイルを次のように変更しようとしました。
string terminal_data_path = TerminalInfoString( TERMINAL_DATA_PATH );
string filename = terminal_data_path + "\\tester\\files\\data.csv";
そしてこのためだけに
string filename = "\\tester\\files\\data.csv";
そしてこのために
string filename = "\\files\\data.csv";
しかし、まだエラーが発生していますが、今回はそうではあり5002
ません5004
。