Hello.
I want to read data from file to the multi-dimensional array.
For example, I have data in file:

|1 2 3 4 5|
|2 3 4 5 1|
|3 2 1 5 2|
|2 6 3 1 2|

and want to assign this to the table. In c++ i do this that:

Qt Code:
  1. ifstream file("name");
  2.  
  3. for(int i=0; i<4; i++)
  4. for(int n=0; n<4; n++)
  5. file>>Data[i][n];
To copy to clipboard, switch view to plain text mode 

but here this not work.

I try to use QFile and QTextStream but I still dont know how to do it.