I made a program which outputs certain number to an external file. To display the output inside the program I would simply use codes like "setw" and setprecision but I couldn't format my numbers in output file with these codes. Am I missing something?Or is there any trick to do it?
n can be upto 999.
for (int k=0; k<n, k++)
for (int l=0; l<n; l++)
sqrfile<<setw(4)<<box[k][l];
sqrfile<<endl;