The first is not correct. A backslash must be properly escaped. Character Constants - Integer Types - Data Types - Language Basics - MQL5 Reference
William Roeder #:
The first is not correct. A backslash must be properly escaped. Character Constants - Integer Types - Data Types - Language Basics - MQL5 Reference
The first is not correct. A backslash must be properly escaped. Character Constants - Integer Types - Data Types - Language Basics - MQL5 Reference
Is this "more" correct?:
#include <Trade\Trade.mqh> #include <Trade\OrderInfo.mqh> #include <Trade\DealInfo.mqh> #include <Trade\HistoryOrderInfo.mqh>
(It works).
William Roeder #:
The first is not correct. A backslash must be properly escaped. Character Constants - Integer Types - Data Types - Language Basics - MQL5 Reference
The first is not correct. A backslash must be properly escaped. Character Constants - Integer Types - Data Types - Language Basics - MQL5 Reference
This is interesting, thank you. Although the following code works (I checked), it doesn't look very cool.
#include "src\new.mqh"
Vladislav Boyko:
You can use either except for embedded resources. I use forward slashes because they are always written 'as is', and backslashes may require escaping in many cases.
Backslash:
Forward slash:
Both options compile. Are they equally correct, or is one of them "more" correct?
I would like to use forward slash (probably because it is used in Linux). However, I want to make sure this won’t cause any issues, as I haven’t seen forward slashes used in the documentation.
MQL5 Book: Working with files / Common APIs
- www.mql5.com
It is difficult to find a program that does not use data input-output. We already know that MQL programs can receive settings via input variables...
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

Backslash:
Forward slash:
Both options compile. Are they equally correct, or is one of them "more" correct?
I would like to use forward slash (probably because it is used in Linux). However, I want to make sure this won’t cause any issues, as I haven’t seen forward slashes used in the documentation.