Path separator in #include: backslash or forward slash?

Backslash:

#include "src\file.mqh"

Forward slash:

#include "src/file.mqh"

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.

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 

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 

This is interesting, thank you. Although the following code works (I checked), it doesn't look very cool.

#include "src\new.mqh"
Vladislav Boyko #:

This is interesting, thank you. Although the following code works (I checked), it doesn't look very cool.

If anyone didn't immediately figure out why that code looks questionable:

void OnStart()
  {
   Print("src\new.mqh");
  }


Vladislav Boyko #:

This is interesting, thank you. Although the following code works (I checked), it doesn't look very cool.

Ah ha. That appears to be unique for the string format directory.
Vladislav Boyko:

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.

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.
MQL5 Book: Working with files / Common APIs
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...