Question: I'm working on a multi-platform project. I want a simple and quick way of managing OS-specific includes, preferably without any external tools.

I would like something like this (which I'm well aware won't work)

```
#define PLATFORM_A 1
#define PLATFORM_B 2

#ifndef TARGET_PLATFORM
//ERROR
#endif

#if TARGET_PLATFORM == PLATFORM_A
    #define DIR "a"
#elif TARGET_PLATFORM == PLATFORM_B
    #define DIR "b"

#define PLATFORM_INCLUDE(file) \
    #include "platforms/" DIR "/" file

```

Answer: 
You can have preprocessor directives defined by the platform itself. In this way you can use:

```
#ifndef MAC // MAC performs #define MAC

#ifndef WINDOWS // Windows performs #define WINDOWS

#ifndef UNIX // Unix performs #define UNIX

// ERROR

#endif

#endif

#endif

```
Try using + between your strings. That should be the C++ syntax.

So something like:

```
#define PLATFORM_INCLUDE(file) \
    #include "platforms/" + DIR + "/" file

```