2 dimentional array help

i need to read a file from notpad and calcutate a two dimentional array
Total Average
________________________________________________________________________________________
1 8 5 2 4 1 1 1 3 ?? ??
2 5 7 2 2 3 4 3 1 ?? ??
3 5 1 1 0 0 0 5 5 ?? ??
4 2 3 2 1 2 2 2 3 ?? ??
5 7 2 0 0 0 1 4 1 ?? ??
6 2 2 2 2 3 4 3 2 ?? ??
7 2 1 2 3 3 1 2 1 ?? ??
8 5 8 1 1 2 1 2 1 ?? ??
9 4 8 2 1 1 2 3 2 ?? ??
10 1 4 4 4 2 4 2 4 ?? ??
__________________________________________________________________________
Total ?? ?? ?? ?? ?? ?? ?? ?? ?? ??
Average ?? ?? ?? ?? ?? ?? ?? ?? ?? ??


it would be each row total and average
each column total and average

i seek idea where to start
you can use the getline function to read each line, then store each line into the array.
http://www.cplusplus.com/doc/tutorial/files/

in case you don't have to use an array, i would use a vector, since you don't need to define its size and it has some helpful functions.
how can i do
the first row....sum & average, the first colum...sum & average
the second row..sum & average,the secend column..sum & average
third row...sum,third..column..sum
---------- -----------
----------- -----------
----------- -----------
----------- -----------
Topic archived. No new replies allowed.