日期:2014-05-17 浏览次数:20770 次
void clrClass::MemberLoad(array<int>^MyIntArray,String^ str)
{
int i=0;
FileStream^ fs = File::OpenRead(str);
StreamReader^ sr=gcnew StreamReader(fs);
MyIntArray[i]=sr->Read();
sr->Close();
fs->Close();
}
void clrClass::MemberLoad(array<int>^MyIntArray,String^ str)
{
FileStream^ fs = File::OpenRead(str);
StreamReader^ sr=gcnew StreamReader(fs);
array<String^>^ data=sr->ReadToEnd()->Split(' ');
for(int i=0;i<data->Length;i++)
MyIntArray[i]=Convert::ToInt32(data[i]);
sr->Close();
fs->Close();
}