Search code examples
c++cheadernewline

Find the system's line terminator


Is there a header file somewhere that stores the line termination character/s for the system (so that without any #ifdefs it will work on all platforms, MAC, Windows, Linux, etc)?


Solution

  • No, because it's \n everywhere. That expands to the correct newline character(s) when you write it to a text file.