c++: optimize writing to .csv file -
i have huge array of positive (>=0) integers , in program need print file several times, formatting matrix in .csv
i wondering efficient way this, since program spending of time writing out...
my way is:
ofstream fout(to_string(k)+".csv) if(fout){ for(unsigned int i; i<numrows; ++i){ for(unsigned int j; j<numcol; ++j fout<<array[i*numcol+j]<<","; fout<<array[i*numcol+numcol-1]<<"\n"; }; }else{.....};
Comments
Post a Comment