| ... | ... | @@ -46,7 +46,7 @@ You have seen compiler guards before in header files in the form of |
|
|
|
...
|
|
|
|
#endif
|
|
|
|
```
|
|
|
|
You can read more about these [here](https://msdn.microsoft.com/en-us/library/ew2hz0yd.aspx). On Mac OS, the operating system macro is `__APPLE__`.
|
|
|
|
You can read more about these [here](https://msdn.microsoft.com/en-us/library/ew2hz0yd.aspx). On macOS, the operating system macro is `__APPLE__`.
|
|
|
|
|
|
|
|
```
|
|
|
|
#ifdef __APPLE__
|
| ... | ... | @@ -55,7 +55,7 @@ freopen(“outputFilename.txt”, “w”, stdout); |
|
|
|
#endif
|
|
|
|
```
|
|
|
|
|
|
|
|
This will compile with `freopen()` *only* when the operating system is *Mac OS*, so when your code compiles on CAEN, those lines are ignored.
|
|
|
|
This will compile with `freopen()` *only* when the operating system is *macOS*, so when your code compiles on CAEN, those lines are ignored.
|
|
|
|
|
|
|
|
### Using environment variables
|
|
|
|
|
| ... | ... | |