title: Conversion from CString to char*/TCHAR*
body: <p>I am well aware of techniques to convert <code>CString</code> to a C-style character. One of them is to use <code>strcpy</code>/<code>_tcscpy</code>, and others include using <code>CStrBuf</code>. </p>
  
  <p>The problem:</p>
  
  <pre><code>char Destination[100];
  CStringA Source; // A is for simplicity and explicit ANSI specification.
  
  Source = "This is source string."
  </code></pre>
  
  <p>Now I want this:</p>
  
  <pre><code>Destination = Source;
  </code></pre>
  
  <p>To happen automatically. Well, that logically means writing a conversion operator in <code>CString</code> class. But, as implicit as it is, I dont have <em>privileges</em> to change the <code>CString</code> class.</p>
  
  <p>I thought of writing a global conversion opertor and global assignment operator. But it doesnt work:</p>
  
  <pre><code>operator char* (const CStringA&amp;); // Error - At least must be class-type
  operator = ... // Won't work either - cannot be global.
  </code></pre>
  
  <p>Yes, it is definitely possible to write function (preferably a templated one). But that involves <strong>calling</strong> the function, and it is not smooth as assignment operator.</p>