title: C++ Cast increment cast
body: <pre><code>someobject* scratchpad[10000][33];
  </code></pre>
  
  <p>I want to do this in one statement:</p>
  
  <pre><code>unsigned int index = (int) scratchpad[j][0];    
  scratchpad[j][0] = (someobject*) (index + 1);
  </code></pre>
  
  <p>I thought it was:</p>
  
  <pre><code>unsigned int index = (unsigned int) ++((char*)scratchpad)[j][0];
  </code></pre>
  
  <p>But I can't quite get the syntax right.  I'm actually storing an integer in the first (0) sub-array index.</p>