我可以假设使用 fwrite 生成并使用 fread 读取的文件可以跨不同系统移植吗?32 位/64 位 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);
那么结构呢
struct mat_t{
size_t x;
size_t y;
double **matrix;
}
这些是便携式的吗?