I need to save a struct in a bin file and my doing that as below:
struct InputData inputData;
//do something
fileName = "xyz.bin";
fstream data_file(fileName.c_str(), ios::out|ios::binary);
data_file.write(reinterpret_cast<char *>(&inputData), sizeof(InputData));
data_file.flush();
data_file.close();
Now, I'm able to open it using a C++ code for reading it but how do I open it in a text editor or something else where I can see the values of each data member?
Thanks
EDIT:
Here's what inputData looks like:
struct InputData
{
double JE_user;
double CA_FR;
double kz_user;
double kzt_user;
double kd_user;
double basic_v_user;
double JE_roof_user;
double Roof_Thk_user;
int Shell_Material_No[15][4];
int Option_walkway;
int curb_angle_No_user;
int Option_PWG;
int stfr_Mat_No[45];
int stfr_Sec_No[45][2];
int No_of_ShellCourses;
int No_of_Stiffeners_R;
int Shell_Appendx_No;
double weight_stair_user;
double weight_adder_user;
double Av;
int Roof_Material_No;
double snow_load_bal;
};