← 返回列表

C库函数 - mbtowc()

C库函数 - mbtowc() #include <stdio.h> #include <stdlib.h> #include <string.h> int main () { char *str = "This is codingdict.com"; wchar_t mb[100]; int len; len = mblen(NULL, MB_CUR_MAX); mbtowc(mb, str, len*strlen(str) ); wprintf(L"%ls \n", mb ); return(0); }

C库函数 - mbtowc()

#include <stdio.h>

#include <stdlib.h>

#include <string.h>



int main () {

   char *str = "This is codingdict.com";

   wchar_t mb[100];

   int len;



   len = mblen(NULL, MB_CUR_MAX); 



   mbtowc(mb, str, len*strlen(str) );



   wprintf(L"%ls \n", mb );   



   return(0);

}

打开资源 ↗

交流与评论