![]() |
|
#1
|
|||
|
|||
game problem using linkedListType.h and random functionhi everyone: im having problem on how to use the header file named linkedListType.h and used it as a game. its a guessing game like(hangman)..make the user guess what's the word by cin a character.. when the character match with one of the char in the word.. then the letter shows up until the word complete otherwise the user only have to make 5 errors to make.. but the program will not stop.. my question is.. how can i do that in the main? how can i generate a random function? if my linkedListType.h goes something like this..
CPP / C++ / C Code:
is this header file really works with the kind of problem i have? i really dont know where to start.. im having trouble with the string and the char data type.. like a string in an array, make a random function, and with so many function in the header file,which one will i declare first in the main first.. please help me.. |
|
#2
|
|||
|
|||
Re: game problem using linkedListType.h and random functionYou have a slight error in the file
This CPP / C++ / C Code:
needs to be changed to CPP / C++ / C Code:
Maybe that solves your problem It's also good programming practice to seperate your functions and the declarations into different files such as Code:
Then in the linkedListType.h | insert an #Include to "linkedListType.cpp" Do the same for the linkedListType.cpp. It's also good programming practice to add #ifdef to it so you dont end up including the same file twice So then in your main file all you have to do is add one of them preferably the .h one. That solves part of your problem ...Now for the other part...Hmm |
|
#3
|
||||
|
||||
Re: game problem using linkedListType.h and random functionQuote:
__________________
Got a cough? Go home tonight and eat a whole box of Ex-Lax. Tomorrow, you'll be afraid to cough. -- Pearl Williams |
|
#4
|
|||
|
|||
Re: game problem using linkedListType.h and random functionOh yeah
I forgot [/cough] |
|
#5
|
|||
|
|||
Re: game problem using linkedListType.h and random functionusing the same header file, how will you create a game? uhmmm like hangman?...
i got some questions in making up the game... in an array library of words, how can i get access to those words and separating the characters of the words?... and then how can i put it in the linked list?... gawd im having a hard time... |
|
#6
|
|||
|
|||
Re: game problem using linkedListType.h and random functionMaybe save it to a file
so then the user can edit the words |
Recent GIDBlog
Python ebook by crystalattice
| Thread Tools | Search this Thread |
| Rate This Thread | |
|
|
Similar Threads
|
||||
| Thread | Thread Starter | Forum | Replies | Last Post |
| tricky random gen problem | corruptjedi | C++ Forum | 2 | 06-Feb-2007 14:37 |
| random access file read problem | wmmccoy0910 | C Programming Language | 13 | 19-Aug-2006 03:02 |
| Help on Basic Design C++ | maliquenavidad | C++ Forum | 4 | 28-Nov-2005 22:24 |
| Nested for loop with function | Tori | C++ Forum | 11 | 08-Nov-2004 14:02 |
| urgent needs :apache + random function | jack | Apache Web Server Forum | 0 | 19-Jan-2004 18:41 |
Network Sites: GIDNetwork · GIDWebHosts · GIDSearch · Learning Journal by J de Silva, The