Originally Posted by
2kaud
If you just want to calculate the highest, lowest and average for different vechicle types, there is no need to read the data into arrays. You want a struct containing high, low, average, total, numreg and then a 2 element array of this struct (for types A and M ) or even better use a map like in my example program. As you read in each line from the file, just update high, low, total, numreg for the appropriate array and then at the end calculate the average. Then just output the required info. Simples!:D