现在要从一个文件中读取数据,该文件的内容是调用C的函数
fwrite(dd.s, 16, 1, fp);
fwrite(&(dd.a), 4, 1, fp);
fwrite(&(dd.b), 4, 1, fp);
写入的,其中dd 为结构
struct {
char s[16];
int a;
int b;
} dd;
假如现在一共写入了3个结构,怎样在delphi里将文件的数据读出并显示?
fwrite(dd.s, 16, 1, fp);
fwrite(&(dd.a), 4, 1, fp);
fwrite(&(dd.b), 4, 1, fp);
写入的,其中dd 为结构
struct {
char s[16];
int a;
int b;
} dd;
假如现在一共写入了3个结构,怎样在delphi里将文件的数据读出并显示?
char s[16];
int a;
int b;
} dd;
可以使用type record
struct {
u_int8_t ch[16];
u_int32_t a;
u_int32_t b;
}dd;
把它写入文件,现在要在delphi中定义一个对应的record,
怎样定义才合适?因为要对记录文件进行操作。