title: How to work with wchar_t strings?
body: <blockquote>
    <p><strong>Possible Duplicate:</strong><br>
    <a href="https://stackoverflow.com/questions/8718740/in-c-why-cant-i-write-to-a-string-literal-while-i-can-write-to-a-string-ob">In C++, Why can&#39;t I write to a string literal while I <em>can</em> write to a string object?</a>  </p>
  </blockquote>
  
  
  
  <p>I'm having my first experience with wchar_t strings and I'm having a lot of trouble. Each time I try to access a character in an wchar_t* the program crashes with segmentation fault. How should I do if I want to replace one character in the string with another? But when deleting a character from the end of the string?</p>
  
  <pre><code>wchar_t * my_string[] = L"Hello";
  my_string[0] = L'Y'; // Should be "Yello". Instead, gives segmentation fault
  </code></pre>
  
  <p>[edit]
  Doesn't matter, I've just made a fool out of myself. I'll check elsewhere on the internet. It's my fault, I shouldn't be bothering you with such silly questions...</p>