G
guysmiley
Hi,
I have a structure that looks like this:
struct {
UINT i1;
UINT i2;
UINT i3;
UINT i4;
char* c1;
char* c2;
char* c3;
char* c4;
}yada;
If I use:
yada.i1 = (UINT)atoi(somecstring);
yada.i3 = (UINT)atoi(someothercstring);
i3 wll contain the value of i1 on some runs.
If I use an intermediate variable to get the value first,
then assign it to i3, it seems to work all the time.
Could anyone explain why this happens?
Thanks,
Scott
I have a structure that looks like this:
struct {
UINT i1;
UINT i2;
UINT i3;
UINT i4;
char* c1;
char* c2;
char* c3;
char* c4;
}yada;
If I use:
yada.i1 = (UINT)atoi(somecstring);
yada.i3 = (UINT)atoi(someothercstring);
i3 wll contain the value of i1 on some runs.
If I use an intermediate variable to get the value first,
then assign it to i3, it seems to work all the time.
Could anyone explain why this happens?
Thanks,
Scott