title: When to use unsigned char pointer
body: <p>What is the use of <code>unsigned char</code> pointers? I have seen it at many places that pointer is type cast to pointer to <code>unsinged char</code> Why do we do so?</p>
  
  <p>We receive a pointer to <code>int</code> and then type cast it to <code>unsigned char*</code>. But if we try to print element in that array using cout it does not print anything. why? I do not understand. I am new to c++.</p>
  
  <p><strong>EDIT</strong> Sample Code Below</p>
  
  <pre><code>int Stash::add(void* element)
  {
      if(next &gt;= quantity)
      // Enough space left?
          inflate(increment);
  
      // Copy element into storage, starting at next empty space:
      int startBytes = next * size; 
      unsigned char* e = (unsigned char*)element;
      for(int i = 0; i &lt; size; i++)
          storage[startBytes + i] = e[i];
      next++;
      return(next - 1); // Index number
  }
  </code></pre>