MBCS和UNICODE

char ipport[50]={0}; //inet_ntoa返回内部数组,多次调用会被覆盖 sprintf(ipport,"%s:%d",inet_ntoa(addrClient.sin_addr),ntohs(addrClient.sin_port)); wchar_t w_ipport[50]={0}; mbstowcs(w_ipport,ipport,50);//#include <cstdlib> wprintf(L"%s/n",w_ipport);

 

 

你可能感兴趣的:(MBCS和UNICODE)