From: Boon van der RJ Newsgroups: comp.os.msdos.djgpp Subject: Re: Question about pointer Date: 18 Sep 1998 11:08:01 GMT Organization: Fac. Wiskunde & Informatica, VU, Amsterdam Lines: 38 Message-ID: <6tteuh$6as$1@star.cs.vu.nl> References: <360224e3 DOT 23441421 AT news DOT hknet DOT com> NNTP-Posting-Host: sloep46.cs.vu.nl User-Agent: tin/pre-1.4-980730 (UNIX) (SunOS/5.5.1 (sun4u)) Originator: rjvdboon AT sloep46 DOT cs DOT vu DOT nl To: djgpp AT delorie DOT com DJ-Gateway: from newsgroup comp.os.msdos.djgpp Precedence: bulk Walter Wong wrote: > Can anyone correct me if I am wrong. > > int *b = &a > This line is same as > int *b > b = &a you're right. (if `a' is a plain int.) > also > > This line *a++ = *b++ > same as a++; b++; > *a = *b dunno OTTOMH (of the top of my head). Check your private book about C-programming which explains parameter precedence. If you're unsure, just use parenthesis to make it explicit. *(a++) = *(b++); <==> a++; b++; *a=*b; Maybe time to test some simple programs so you get confident about programming with pointers? Maybe time to read the book I suggested you to buy yesterday, or read some on-line[1]? Maybe time to ask in comp.lang.c (these kind of questions is not DJGPP specific)? hth, Robert. [1] Information about C programming on-line are at (among others): The C coders homepage: http://www.angelfire.com/sc/electron/ Coronado Enterprise Tutorials: http://www.swcp.com/~dodrill/ ITI Developers Central tutorials: http://devcentral.iftech.com/learning/tutorials/subcpp.asp/ -- rjvdboon AT cs DOT vu DOT nl | "En dat is niet waar!" sprak ex-Staatsecretaris- www.cs.vu.nl/~rjvdboon | van-Onderwijs Netelenbos fel.