Path: utzoo!news-server.csri.toronto.edu!cs.utexas.edu!swrinde!elroy.jpl.nasa.gov!ncar!gatech!prism!cc100aa From: cc100aa@prism.gatech.EDU (Ray Spalding) Newsgroups: comp.lang.c Subject: Re: A quick question... Message-ID: <24247@hydra.gatech.EDU> Date: 13 Mar 91 17:13:55 GMT References: <1991Mar12.030759.26698@nntp-server.caltech.edu> <1991Mar12.062941.2369@nntp-server.caltech.edu> Organization: Georgia Institute of Technology Lines: 17 In article <1991Mar12.062941.2369@nntp-server.caltech.edu> eychaner@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@prism.gatech.edu