title: How to put/get INT to/from a WCHAR array?
body: <p>how can I put a INT type variable to a wchar array ?</p>
  
  <p>Thanks</p>
  
  <p><strong>EDIT:</strong></p>
  
  <p>Sorry for the short question. Yes we can cast INT to a WCHAR array using WCHAR*, but when we are retrieving back the result (WCHAR[] to INT), I just realize that we need to read size of 2 from WCHAR array since INT is 4 BYTEs which is equal to 2 WCHARs.</p>
  
  <pre><code>WCHAR arData[20];
  INT iVal = 0;
  wmemcpy((WCHAR*)&amp;iVal, arData, (sizeof(INT))/2);
  </code></pre>
  
  <p>Is this the safest way to retrieve back INT value from WCHAR array</p>