title: Converting unicode strings and vice-versa
body: <p>I'm kind of new to using <em>Unicode</em> string and pointers and I've no idea how the conversion to unicode to ascii and versa-versa works. Following is what I'm trying to do,</p>
  
  <pre><code>const wchar_t *p = L"This is a string";
  </code></pre>
  
  <p>If I wanted to convert it to <code>char*</code>, how would the conversion work with converting <code>wchar_t*</code> to <code>char*</code> and vice-versa?</p>
  
  <p>or by value using <code>wstring</code> to <code>string</code> class object and vice-versa</p>
  
  <pre><code>std::wstring wstr = L"This is a string";
  </code></pre>
  
  <p>If i'm correct, can you just copy the string to a new buffer without conversion?</p>