Can I assume a file generated with fwrite and read using fread is portable across different systems. 32bit/64bit windows,osx,linux.
//dumping
FILE *of =fopen("dumped.bin","w");
double *var=new double[10];
fwrite(var, sizeof(double), 10,FILE);
//reading
file *fo=fopen()
double *var=new double[10];
fread(var,sizeof(double),10,of);
And what about structs
struct mat_t{
size_t x;
size_t y;
double **matrix;
}
Are these portable?