Path: utzoo!attcan!uunet!lll-winken!lll-lcc!ames!mailrus!uflorida!gatech!hubcap!ncrcae!secola!broadway!furlani From: furlani@broadway.UUCP (John L. Furlani) Newsgroups: comp.lang.c Subject: Re: down Message-ID: <193@broadway.UUCP> Date: 14 Dec 88 01:26:12 GMT References: <45370@yale-celray.yale.UUCP> <2803@hound.UUCP> Organization: University of South Carolina, College of Engineering Lines: 31 In article <2803@hound.UUCP>, rkl1@hound.UUCP (K.LAUX) writes: > In article <45370@yale-celray.yale.UUCP>, wald-david@CS.YALE.EDU (david wald) writes: > > > > You can't assign to a ++ expression. > > > > Of course you can! For example, a simple string copy function: > > copy_string (from, to) > char *from; > char *to; > { > while (*to++ = *from++) > ; > } > Take another look. You aren't assigning anything to the ++ expression. Oops. You are assigning something to what is contained in the pointers. The *pointers* are being incremented. David Wald was correct, you can't assign to a ++ expression. Try it and watch what happens. ____________ Disclaimer: "If anyone else was responsible, it had to have been me, and myself" John L. Furlani The University of South Carolina, Columbia SC (...!uunet!ncrlnk!ncrcae!broadway!furlani)