- #1
maverick_starstrider
- 1,119
- 6
Hi, I'm just wondering, usually when I output to file in C++ I just do like:
fout.open("output.txt",ios:ut);
fout.precision(13);
fout << data1 << " " << data2 << " " << data3 << endl;
or something to that effect. i.e. I use c++'s file streams. However, for my current application minimizing space is an absolute must. Therefore, are there other ways of outputting this same data (columns of 3 doubles) to a file that will create a smaller file? I've experimented with fprintf and such but it seems to create the same sized file. Any help is greatly appreciated.
fout.open("output.txt",ios:ut);
fout.precision(13);
fout << data1 << " " << data2 << " " << data3 << endl;
or something to that effect. i.e. I use c++'s file streams. However, for my current application minimizing space is an absolute must. Therefore, are there other ways of outputting this same data (columns of 3 doubles) to a file that will create a smaller file? I've experimented with fprintf and such but it seems to create the same sized file. Any help is greatly appreciated.