my program stop running while executing the following line. (struct IFramHead *) ptr) ->length = Length; where declaration are as bellow: 1: unsigned int Length 2: struct IFramHead { unsigned int length; unsigned int index; } 3: unsigned char *ptr; I have use this sentex while writingcode for C51 compiler. is this problem is arises because of 8 or 16 bit processor, or there is some memory problem or stack problem. if anybody know why this line not behave well then please reply me as soon as possible. thanks amit patel
When i define a pointer to this structure then it points to odd address Only if the way you defined this pointer was incorrect. Until you reveal how you arrived at that pointer, and give some explanation of why you thought this method should have worked, the only sensible answer remains: "Don't do that, then!".