Hi,I want to convert String^ to Int array or a char array.I am reading numbers from a file in GUI but the StreamReader Reads the Text in a String.I need to convert them to use the numbers.
I have tried ToCharArray() function but it doesnt work!
this function gives the following error:
e:\my documents\visual studio 2008\projects\assignment 3\assignment 3\Form1.h(109) : error C2440: 'initializing' : cannot convert from 'cli::array<Type,dimension> ^' to 'char []'
with
[
Type=wchar_t,
dimension=1
]
-------------------
Here is my code:
StreamReader ^read=gcnew StreamReader("matrice.txt");
String ^x=read->ReadLine();
char arr[]=x->ToCharArray();
MessageBox::Show(arr->ToString(),"message");
I need to convert the string to char or int array!
Thank You!