From: Erik Max Francis Newsgroups: comp.os.msdos.djgpp Subject: Re: Why won't it change?!? Date: Sun, 06 Jul 1997 14:22:07 -0700 Organization: Alcyone Systems Lines: 39 Message-ID: <33C00C7F.3A930BEC@alcyone.com> References: <5pnu89$6tr$1 AT missing DOT link DOT ca> NNTP-Posting-Host: newton.alcyone.com Mime-Version: 1.0 Content-Type: text/plain; charset=us-ascii Content-Transfer-Encoding: 7bit To: djgpp AT delorie DOT com DJ-Gateway: from newsgroup comp.os.msdos.djgpp Precedence: bulk James Edwin Cooper wrote: > Here is a sample program I made: > main() > { > char letter; > printf("please type a letter: "); > getche(letter); > printf("\nYour letter was "%c, letter); > } Well, this sample program isn't very helpful, since it clearly wouldn't work. getche returns the character, not what you have here (which couldn't work without references anyway). If you want people to try to help you, we're going to need more to go on than your vague memory of what the program that caused the problem and the output was. > Any reason WHY? Same thing happens with random number generators. Also, I > tried a timing exercise and here is what happened: ... Or even worse, no sample program at all, and just hypothetical output. > If you can explain ANY of these odd occurances It would be appreciated. > P.S. I got these STRAIGHT from a book (with minor changes for DJGPP) so > their is NO mistakes in what I compiled! Just because you don't get any errors (turn on all warnings with -Wall -ansi -pedantic), doesn't mean there isn't anything wrong with the program. -- Erik Max Francis, &tSftDotIotE / email / max AT alcyone DOT com Alcyone Systems / web / http://www.alcyone.com/max/ San Jose, California, United States / icbm / 37 20 07 N 121 53 38 W \ "All the gods are dead / except the god of war." / Eldridge Cleaver