CompuServe Thread

#C class

2 messages in this thread
#32989From: Vic WagnerJan 31, 1989 9:58 PM
The problem that I see with your 'assignment #5' is that the 'while loop' which starts: while (c != EOF) never changes c, so except in the _very_ unlikely case of the first character of the file being EOF, the program will loop here indefinetly. I suggest you delete the line: c = getchar(); and replace the while (c != EOF) with: while ((c = getchar()) != EOF) see how that works. Regarding the 15 puzzle, I'm looking only for unique ones, and I agree there are only 4 starting moves. no, I'm not a musician, I just like music.
#33006From: Don ReinfeldJan 31, 1989 11:20 PM
Thanks, Vic! I guess I just didn't understand that getchar syntax. I did get it working after Larry Phillips, Don Curtis and Barry(?) Bartlett all responded. Hope you're feeling better!! –Don Reinfeld