C++ C++;Winform如何将字符串数组解析为int数组?

C++ C++;Winform如何将字符串数组解析为int数组?,c++,arrays,string,winforms,int,C++,Arrays,String,Winforms,Int,在主要目标中,我需要通过删除逗号,将输入从(“5,23,12,23…”)更改为(“5 23 12…”) 我已经删除了这个逗号,但下一个对象是从这个输入数字中查找最小值和最大值。我不知道如何将array解析为array来实现下一个目标 我不能做这个number[word]=Convert::ToInt32(words[word])ToCharArray(); 数组^字; 数组^number; 智力测验; //从输入ui获取文本 strInput=txtInput->Text; 文字=划线->拆分(

在主要目标中,我需要通过删除逗号
将输入从
(“5,23,12,23…”)更改为
(“5 23 12…”)

我已经删除了这个逗号,但下一个对象是从这个输入数字中查找最小值和最大值。我不知道如何将
array
解析为
array
来实现下一个目标

我不能做这个
number[word]=Convert::ToInt32(words[word])
String^ strInput="";
String^ strResult="";
String^ strRemove=",";

array<Char>^Remove=strRemove->ToCharArray();
array<String^>^words;
array<Int32^>^number;
int test;
//get text from input ui
strInput=txtInput->Text;
words=strInput->Split(Remove);

for(int word=0;word<words->Length;word++)
{
    /*number[word]=Convert::ToInt32(words[word]);*/
    test=Int32::Parse(words[word]);
    txtResult->Text+=words[word]+" ";
}
String^strInput=”“;
字符串^stresult=“”;
字符串^stremove=“,”;
数组^Remove=stremove->ToCharArray();
数组^字;
数组^number;
智力测验;
//从输入ui获取文本
strInput=txtInput->Text;
文字=划线->拆分(删除);
for(int-word=0;字长;word++)
{
/*数字[字]=转换::到32(字[字])*/
test=Int32::解析(words[word]);
txtResult->Text+=单词[单词]+“”;
}

应通过添加以下内容来解决:

number = gcnew array<Int32^>(words->Length);
number=gc新数组(字->长度);
在您的for循环之前


你当前的注释行应该工作。

这不是C++。可能是C++/CLI。