mardi 28 avril 2015

how can I handle large output file in different file in c++ using freopen?

I want to store output in a file by using like this:

int main()
{  
  freopen("Output.txt", "w", stdout);

  // this code is for store combination 64C5 output value 
  // and its 7624512 line in Output.txt file

  return 0;
}

when I run this program, I got 2.4GB file and I can not open this for huge large file.

Now I want to store this output in different file by partition this huge large file in spacific file size or specific line at the running program. So what can I do?

Like I want to store by this.

Output1.txt
Output2.txt
Output3.txt
Output4.txt
.
.
.

Aucun commentaire:

Enregistrer un commentaire