Vc++ sortowanie linii

chodzi mi aby powstało z tego:

0,3, 0,004716, 0,000000

0,8, 0,005682, 0,000000

0,7, 0,004914, 0,000000

0,5, 0,008304, 0,000000

to:

0,3, 0,004716, 0,000000

0,5, 0,008304, 0,000000

0,7, 0,004914, 0,000000

0,8, 0,005682, 0,000000

a oto kod:

#include "stdafx.h"

using namespace System::IO;

using namespace System;

using namespace System::Collections;

void PrintValues( IEnumerable^ myList );


ref class MyClass {};


int main(){



{ String^ fsRead = "1.txt";

  StreamReader^ sr = gcnew StreamReader(fsRead);


  String^ fsWrite = "2.txt";

  StreamWriter^ sw = gcnew StreamWriter(fsWrite);


  String^ s = "";

  ArrayList^ arr = gcnew ArrayList;

  while ((s = sr->ReadLine()) != nullptr)

  {

            arr->Add(s);



  }

  arr->Sort();

  for (int i = 0; i < (arr->Count); i++)

  {


	  sw->WriteLine(arr(i));}






                        sw->Flush();

                        sw->Close();

                        sr->Close();








	//Console::ReadLine();

    //return 0;


}

}

jak można naprawić ten błąd? czy kod ma sens?

Error	1	error C2064: term does not evaluate to a function taking 1 arguments	xxx\pro3sort.cpp	32

chodzi mi aby powstało z tego:

0,3, 0,004716, 0,000000

0,8, 0,005682, 0,000000

0,7, 0,004914, 0,000000

0,5, 0,008304, 0,000000

to:

0,3, 0,004716, 0,000000

0,5, 0,008304, 0,000000

0,7, 0,004914, 0,000000

0,8, 0,005682, 0,000000

A zobaczyłeś który to wiersz ma numer 32?

Treść błędu mówi że próbujesz użyć jako funkcje z jednym argumentem coś co nie jest funkcją.