I am trying to use StreamReader to read a file and to separate the lines that I read by commas (Del).
I think I have managed to Read the file so I will have the Line in the StringLine.
Now is my problem how I will put the values to the Vectors with the ->Add method.
How will I separate out this line by Commas to do this ?
text1,1.1,2.2
text2,3.3,4.4
Code:StreamReader^ File1 = gcnew StreamReader( "D:\\Files\\OneFile.txt" ); String^ Del = ","; String^ StringLine; String^ Text; List<String^>^ String1 = gcnew List<String^>(); List<double> Value1 = gcnew List<double>(); List<double> Value2 = gcnew List<double>(); while ( File1->Peek() >= 0 ) { StringLine = File1->ReadLine(); Day1->Add( ); Value1->Add( ); Value2->Add( ); }