so i am making a game that makes files and directorys for saving and stuff like that. the only problem is that my paths will differ from os to os. are there any c pre proccessor macros that will do this for me?
This kind of information should be part of the build process (makefiles and the like), not embedded in the code.
That site, BTW, is a gem on the internet, and it is very clear. If you want code that caters to a specific OS, then you wrap it in a macro that identifies that OS. For example:
i wasn't offending the site but its just probably more clear to you than it is to me. like if i showed my friends a bunch of c code they wouldnt get it even though it would be clear to me. alls im asking for are three macros like the one above for each os
If you're looking for macros that will build a file path automatically depedning on the operating system, there aren't any that come as part of the C language.
There are game development libraries (GUI) that can do this, but that wasn't what you were asking.
The sourceforge page linked earlier lists symbols that are predefined by each of a large number of compilers. If a particular symbol is defined, then you know you are compiling under that particular compiler as Duoas' example showed.
I suspect all you really want to know is if you're compiling under Windows or some Linux variant. Taking Duoas' example a step further:
Then use the value of PATH_SEPARATOR to construct your file or path name assuming your file or path name is the same and the only thing that is different is the path separator.
@Duoas: a better approach would be to use environment variables, command line arguments, config files, etc.
That way different users may have different paths using the same executable.