title: Type "char" in C++
body: <p>Is there an easy way to convert between <code>char</code> and <code>unsigned char</code> if you don't know the default setting of the machine your code is running on? 
  (On most architectures, <code>char</code> is signed by default and thus has a range from <code>-128</code> to <code>+127</code>. On some other architectures, such as ARM, <code>char</code> is unsigned by default and has a range from 0 to 255)
  I am looking for a method to select the correct signedness or to convert between the two transparently, preferably one that doesn't involve too many steps since I would need to do this for all elements in an array.</p>
  
  <p>Using a pre-processor definition would allow the setting of this at the start of my code.<br>
  As would specifying an explicit form of <code>char</code> such as <code>signed char</code> or <code>unsigned char</code> as only <code>char</code> is variable between platforms.</p>
  
  <p>The reason is, there are library functions I would like to use (such as <code>strtol</code>) that take in <code>char as an argument</code> but not <code>unsigned char</code>.</p>
  
  <p>I am looking for some advice or perhaps some pointers in the right direction as to what would be a practical efficient way to do this to make the code portable, as I intend to run the code on a few machines with different default settings for <code>char</code>.</p>