D

D

  • NA
  • 12
  • 11.8k

Jagged Arrays

Mar 4 2012 7:55 PM

Initially, when the application starts, both listboxes will be empty, the number of regions will be zero, and the Sum shown will be $0.00.

When the button "Load File" is clicked the OpenFileDialog will be used to select a text file. If a text file was selected by the user, the number of lines in the text file will be counted.

After the program has determined the number of lines in the file, you will create an array of strings to hold the region names, and a ragged array of doubles to hold the sales for each region. The file will be in the format shown below; note that the number of sales per region may vary but will always be at least one:

East 45234.90 12345.67 78932.56

West 34567.89

Edmonton 90456.78

Calgary 123456.78 56789.34

South 78654.34

North 34215.67


Question: How do I split the int and string from each other when i read in the text file?



Answers (1)