View Full Version : need help with my program
12-03-2004, 02:23 PM
It's a crossword puzzle
if you not use the import function
everything is fine
but when importing questions from file
it becomes strange
would you please help me to figure out what's going on
attached the files in puzzle.zip
import file file.txt
Just narrow down the code segments you are having problems with and post those.
12-05-2004, 09:11 AM
i originally works well
but become strange after add the following code
int file(char filename)
/* No. of questions in the file */
/* Import Words List */
/* Import Shade List */
/* Import Question Order */
/* Import Answer Order */
/* Print Questions */
where words clear_shaind question_no answer_no are global variables
What becomes strange? Narrow it down to the exactly where it goes wrong. Usually when writing code like that you should write small amounts at a time, and test as you go.
12-06-2004, 12:16 PM
everything works fine if i not add that part of code
if that part is run
then the program can't print out question no. and question of set 1
i duno what's happening
Like I said, you need to start slower. Comment out the body of that function and start adding sections, testing as you go. You make it harder than it needs to be by writing a big function then trying to figure out where it goes wrong.
Powered by vBulletin® Version 4.2.2 Copyright © 2015 vBulletin Solutions, Inc. All rights reserved.