On 06/07/2012 12:19 AM, John Darrington wrote:
> Surely using a symbol instead of a literal constant makes maintenance easier 
> not 
> harder? 

I don't see why.  For example:

  remove ("a/b");

is simpler and easier to maintain than:

  #if DIRECTORY_SEPARATOR == '/'
   #define DIRECTORY_SEPARATOR_STRING "/"
  #elif DIRECTORY_SEPARATOR == '\\'
   #define DIRECTORY_SEPARATOR_STRING "\\"
  #else
   #error "Unknown DIRECTORY_SEPARATOR" DIRECTORY_SEPARATOR
  #endif

  remove ("a" DIRECTORY_SEPARATOR_STRING "b");

Reply via email to