I have a recurring code section that writes data files to a specific directory.
../../Data_x_r/PR2/Scheme_2_TVD_1/. Can i specify as a string "'constant" so that I only change it once rather going through every instance and changing it. Hope I am clear
Code:
stringstream ss;
string file_name;
ss << "surface_z_" << Hori_L/Diameter << "D_PR_" << P_r << "Pe_Ma_" << Mach << "_Time_" << timer1 << ".dat";
file_name = ss.str();
ofstream plotdata(("../../Data_x_r/PR2/Scheme_2_TVD_1/"+file_name).c_str());
Shuo