G
Gary Wessle
Hi
I am trying to pretty print to file 3 vectors (int,double,double)
where all the cells match like a table format where every thing lines
up to the left and space padded to the right.
does c++ has something or mostly use C fprintf?
1255251 0.251025 215.2541
thats how I like it to look, where the space is to the right of the
number and the number left aligns with the field border.
here is my patented effort
int main() {
sync_with_stdio(); //to mix C and C++
ofstream out("output.txt")
for (int i=0; i<vect.size(); i++){
fprintf(out,
"%d8 %f8 %f8"
,vect1, vect2, vect3)
}}
thanks for helping
I am trying to pretty print to file 3 vectors (int,double,double)
where all the cells match like a table format where every thing lines
up to the left and space padded to the right.
does c++ has something or mostly use C fprintf?
1255251 0.251025 215.2541
thats how I like it to look, where the space is to the right of the
number and the number left aligns with the field border.
here is my patented effort
int main() {
sync_with_stdio(); //to mix C and C++
ofstream out("output.txt")
for (int i=0; i<vect.size(); i++){
fprintf(out,
"%d8 %f8 %f8"
,vect1, vect2, vect3)
}}
thanks for helping