A quick question...

Ray Spalding cc100aa at prism.gatech.EDU
Thu Mar 14 03:13:55 AEST 1991


In article <1991Mar12.062941.2369 at nntp-server.caltech.edu> eychaner at suncub.bbso.caltech.edu writes:
>[...]
>unsigned char *arrayptr;
>[...]
>    else if (type == SHORT) {
>        *(short *)arrayptr++ = othervalue();  /* Declared elsewhere */

I think what you want here is:
	*(short *)arrayptr = othervalue();
	arrayptr += sizeof(short);
or:
	*((short *)arrayptr)++ = othervalue();
-- 
Ray Spalding, Technical Services, Office of Information Technology
Georgia Institute of Technology, Atlanta Georgia, 30332-0715
uucp:     ...!{allegra,amd,hplabs,ut-ngp}!gatech!prism!cc100aa
Internet: cc100aa at prism.gatech.edu



More information about the Comp.lang.c mailing list