|
From: David M. <ci...@ya...> - 2003-06-29 23:30:49
|
Is there a portable way of finding out the end-of line sequence for the current operating system? I hope to make my program portable to both Win + *NIX and would like something more (what word could go here?) than: #ifdef WIN32 const char DIR_SEP = '\\'; const char eoln[] = "\n"; #else const char DIR_SEP = '/'; const char eoln[] = "\n\r"; #endif Same applies to the directory separator. Is there a way I can detect which one is used? As I said portability is of utmost importance so it must be C++ ANSI compliant (my program uses classes so it cant be a C compliant program. Signed David Mcken __________________________________ Do you Yahoo!? SBC Yahoo! DSL - Now only $29.95 per month! http://sbc.yahoo.com |