C/stdlib.h/mbtowc

Материал из C\C++ эксперт
Перейти к: навигация, поиск

mbtowc: converts *in to *out

<source lang="cpp">


//Declaration: int mbtowc(wchar_t *out, const char *in, size_t size);


  1. include <stdlib.h>
  2. include <stdio.h>

int main(void){

 char *mb = "asdfadsf";
 char str[1000];
 mbtowc(str, mb, 2);

 printf("%s",str);

}

/* a*/

      </source>