View Full Version : Backslash inside #include

05/03/2018, 03:50 PM
Should I switch from including files with '/' to '\' ?

I'm asking because I already did it, and now I see that I have a lot of 'main.inc' files:

#include "core\admin\main"
#include "core\building\main"
#include "core\item\main"
#include "core\player\main"
#include "core\squad\main"
#include "core\vehicle\main"
#include "core\jobs\main"
#include "core\faction\main"

I could change every file's name, but I got used to create a main file for every system and now I think that in future updates I will forget about this problem and main won't be included (since using '\' will not allow multiple files included with the same name) and then wonder why things don't work.

Give me reasons to get me into this style, despite the problems mentioned above.

05/03/2018, 05:15 PM
Just use 'Replace' method. Sorry If i misunderstand the problem you have.

05/03/2018, 05:29 PM
Go with whatever works, if using / fixes the issue and works as you want it to, do it.

05/03/2018, 06:40 PM
#undef _inc_map

Try this on top of these includes.

06/03/2018, 05:15 PM
Thank you for your suggestions, but I would like to know if there are other advantages in using '\' (except it doesn't let me include multiple files with the same name).

06/03/2018, 05:24 PM
#undef _inc_map

Try this on top of these includes.

If you'd explain why maybe it'd have some weight...

06/03/2018, 06:42 PM
Oh my bad, I thought he needs something which allows him to include multiple includes of the same name.