C/stdlib.h/mbtowc

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

mbtowc: converts *in to *out

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

#include <stdlib.h>
#include <stdio.h>
int main(void){
  char *mb = "asdfadsf";
  char str[1000];
  mbtowc(str, mb, 2);
 
  printf("%s",str);
}
         
/*
a*/