:confused: I have to modify a hangman game to open a sequential file, read thru the file and count the no. of words, generate a random no. from the file and read the word from the file corresponding to the random no. and use it in the game, as well as display the no. of the word being used from the file. I know i need to use the objStreamReader in the sub filenewmenuitem_click, but i cant figure out how to get the words to link to the game. Can someone help me??????

Recommended Answers

All 4 Replies

to get words to link to the game just write a function that calls for example a text file, then in ure game code, do w/e string name u have, say word, and the name of the function u wrote(getword) ... word = getword("something.txt")

put the something.txt into ure bin folder

If you define the 'words' as string * max length or something where the word has a maximum length you can make it a public type and then the file problem becomes a case of reading / writing 'records' (the word public type) and getting the number of records from a file - which is well documented and extremely simple :) try a google search!

If You can send me yr hangman game and then i can let u know how andwhy u ned to use that.
My E-Mail : dappa_nb@hotmail.com

i need help with hangman ~!!!!

Be a part of the DaniWeb community

We're a friendly, industry-focused community of developers, IT pros, digital marketers, and technology enthusiasts meeting, networking, learning, and sharing knowledge.