Мжт кто знает как преобразовать строку array<String^>^str в char*?
#include < stdio.h >
#include < stdlib.h >
#include < vcclr.h >
String ^str = textBox1->Text->ToString();
pin_ptr<const wchar_t> wch = PtrToStringChars(str);
size_t convertedChars = 0;
size_t sizeInBytes = ((str->Length + 1) * 2);
errno_t err = 0;
char *ch = (char *)malloc(sizeInBytes);
err = wcstombs_s(&convertedChars,
ch, sizeInBytes,
wch, sizeInBytes);
if (err != 0)
printf_s("wcstombs_s failed!\n");