title: reading from file into several arrays
body: <p>I would like to write a c++ code that read a text file test.txt
  and write the conetent into several arrays.
  the file looks like: </p>
  
  <pre><code>[7,13,17]
  [[0,1,1,0,0,1,0,0,1,0,0,0,0,0,1,0,0],
  [1,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0],
  [0,0,0,0,0,1,0,0,0,0,0,0,0,0,0,0,0],
  [1,0,0,1,0,0,0,0,0,1,1,1,0,0,1,0,0],
  [0,0,0,0,0,0,0,0,1,0,0,0,0,0,0,0,0],
  [0,0,0,0,0,0,0,0,1,0,0,0,0,0,0,0,0],
  [0,0,0,0,0,1,0,0,1,0,0,0,1,1,0,0,0],
  [0,0,0,0,0,0,0,0,0,0,0,1,0,0,0,0,0],
  [0,0,0,0,0,0,0,0,0,0,0,1,0,0,0,0,0]]
  </code></pre>
  
  <p>the code i have written like</p>
  
  <pre><code>#include &lt;iostream&gt;
  #include &lt;fstream&gt;
  
  using namespace std;
  
  int main()
  {
  
    int parameter[10];
    int physical[7][7];
  
    const char* filename;
  
       filename = "src/cplex_N7.txt";
  
        ifstream f(filename, ios::in);
        if (!f) {
           cerr &lt;&lt; "No such file: " &lt;&lt; filename &lt;&lt; endl;
           throw(1);
        }
  
      f &gt;&gt; parameter &gt;&gt; physical ;
    // cout  content
     return 0;
  }
  </code></pre>
  
  <p>but i always got errors and wrong output, could you please help with doing this in the best way. I mean can i read the file without for loop or without handling the commas and splitters.</p>