I'd like my programs to work for both a windows operating system and a mac. I know that it can not be done in a function but I want to do somehing like
I'm sure it can't be that simple, but that's the effect I'd like it to have. That way if I wanted a clear screen function, I'd make one with clrscr (); and one with system ("CLS"); put each in the correct header file then later on just type clearscreen (); and it would call the appropriate function depending on which header was included. I hope that made sence. I pretty much want to make two identical header files but they each have platform specific commands. During compile time, my source file should determine what platform it's being compiled on and #include the appropriate header file. I don't know anyway of doing this. Help is appreciated.