Xref: news-dnh.mv.net comp.os.msdos.djgpp:4023 Path: news-dnh.mv.net!mv!news.sprintlink.net!newsfeed.internetmci.com!usenet.eel.ufl.edu!nntp1.jpl.nasa.gov!news.spies.com!uuwest!alcyone!max From: max AT alcyone DOT darkside DOT com (Erik Max Francis) Newsgroups: comp.os.msdos.djgpp Subject: Re: problem running C++ program Message-ID: Date: Sat, 23 Dec 95 15:22:12 PST References: Organization: &tSftDotIotE Lines: 29 To: djgpp AT delorie DOT com DJ-Gateway: from newsgroup comp.os.msdos.djgpp Denis P Dersarkisian writes: > Int9::Int9() > { > int counter; > IRQnumber = 9; > for (counter=0; counter++; counter keypressed[counter] = 0; /* line 54 */ > printf("About to init vars\n"); > e0flag = e1counter = 0; > printf("done, returning...\n"); > } One thing that jumps out at me is that you've got the conditional and incremental portions of your for loop reversed; the first portion is initialization, the second is executed at the beginning of entering the for-statement to determine whether or not iteration should continue, and the third is used for incrementing. Swap the last two portions. There may be other problems; I didn't look any further when I found this. Erik Max Francis, &tSftDotIotE && uuwest!alcyone!max, max AT alcyone DOT darkside DOT com San Jose, California, U.S.A. && 37 20 07 N 121 53 38 W && the 4th R is respect H.3`S,3,P,3$S,#$Q,C`Q,3,P,3$S,#$Q,3`Q,3,P,C$Q,#(Q.#`-"C`- && 1love && folasade _Omnia quia sunt, lumina sunt._ && GIGO Omega Psi && http://www.spies.com/max/ "Out from his breast/his soul went to seek/the doom of the just." -- _Beowulf_