title: C++: sizeof for array length
body: <p>Let's say I have a macro called <code>LengthOf(array)</code>:</p>
  
  <pre><code>sizeof array / sizeof array[0]
  </code></pre>
  
  <p>When I make a new array of size 23, shouldn't I get 23 back for <code>LengthOf</code>?</p>
  
  <pre><code>WCHAR* str = new WCHAR[23];
  str[22] = '\0';
  size_t len = LengthOf(str); // len == 4
  </code></pre>
  
  <p>Why does <code>len == 4</code>?</p>
  
  <p><strong>UPDATE</strong>: I made a typo, it's a <code>WCHAR*</code>, not a <code>WCHAR**</code>.</p>