Backslash inside #include
#1

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:

PHP код:
#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"
//etc.. 
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.
Reply
#2

Just use 'Replace' method. Sorry If i misunderstand the problem you have.
Reply
#3

Go with whatever works, if using / fixes the issue and works as you want it to, do it.
Reply
#4

Код:
#undef _inc_map
Try this on top of these includes.
Reply
#5

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).
Reply
#6

Quote:
Originally Posted by AroseKhanNiazi
Посмотреть сообщение
Код:
#undef _inc_map
Try this on top of these includes.
If you'd explain why maybe it'd have some weight...
Reply
#7

Oh my bad, I thought he needs something which allows him to include multiple includes of the same name.
Reply


Forum Jump:


Users browsing this thread: 1 Guest(s)