Saving an array of numbers into a .txt file

Hi, I need to save an array of numbers into a “.txt” file, any ideas to do that with Proof?
I tried something like:

data.open(“Difference.txt”);

for(int i=0; i<15; i++){
  for(int j=0; j<15; j++)
    {

  data>> twod_vector[i][j];

    }
}
data.close();

But still can’t get the output file.

Try the other direction:

data << twod_vector[i][j];`

Welcome to the ROOT forum.
There is many recipes on the web. Why to you ask about Proof ?

This topic was automatically closed 14 days after the last reply. New replies are no longer allowed.