Hi, i need to parse a bin file in mt4,but i can solve the compile grammar problem .help .thank you very much
(I know one solution is using FileReadInterger FileReadDouble api ,but i prefer using struct pointer )
struct StTest
{
int a;
int b;
double c;
char d[10];
};
void OnStart()
{
uchar buf[1000];
for(int i=0;i<ArraySize(buf);i++)
{
buf[i]=0x11;
}
StTest* p=(StTest*)buf; //big error
printf("%d %d %f %s",p.a,p.b,p.c,CharArrayToString(p.d)); //big error again
}
(I know one solution is using FileReadInterger FileReadDouble api ,but i prefer using struct pointer )
struct StTest
{
int a;
int b;
double c;
char d[10];
};
void OnStart()
{
uchar buf[1000];
for(int i=0;i<ArraySize(buf);i++)
{
buf[i]=0x11;
}
StTest* p=(StTest*)buf; //big error
printf("%d %d %f %s",p.a,p.b,p.c,CharArrayToString(p.d)); //big error again
}