title: Converting from ANSI to Unicode
body: <p>I'm using Visual Studio .NET 2003, and I'm trying to convert a program written in purely ANSI characters to be independent of Unicode/Multi-byte characters.</p>
  
  <p>The program has a callback function of pcap_loop, called "got_packet". It's defined as</p>
  
  <pre><code>void got_packet(u_char *user, const struct pcap_pkthdr *header, const u_char *cpacket)
  {
     USES_CONVERSION;
     _TUCHAR *packet;
     packet = A2T(cpacket);
     ...
  } 
  </code></pre>
  
  <p>However, I get the error message</p>
  
  <pre><code>error C2440: 'type cast': cannot convert from 'const u_char *' to 'ATL::CA2WEX&lt;&gt;'
  </code></pre>
  
  <p>How do  fix this?</p>