In my C++ code, I want to generate my data (6 digits) as e.g. 4 columns. I'd like also to put the name of each variable on the first line. Here is the way that I do by aligning them with some try-error which is of course not the elegant and proper way:
out_file << "p_x \t p_y \t re_part \t calibrate" << endl;
out_file << p_x<<"\t"<<p_y<<"\t"<<real(beta)<<"\t"<<calib<<endl;
Q: How can I format them in a way that each name appear on top of the corresponding column? Thanks in advance!