 |
Cheat Engine The Official Site of Cheat Engine
|
| View previous topic :: View next topic |
| Author |
Message |
eagles358 Expert Cheater
Reputation: 0
Joined: 10 Apr 2007 Posts: 174
|
Posted: Sat Jul 07, 2007 8:23 pm Post subject: CEF Hangman game, made in c++ |
|
|
I made a hangman game in c++ (im still pretty new), and i thought id post it to see what people think of it, or to see if anyone had any ideas to improve it. Its pretty long (like 1000 lines) so i didnt post it in text, and i put a rapidshare link up. used dev-c++ compiler. The words in the game are well known CEF members (no numbers).
exe:
http://rapidshare.com/files/41654429/CEF_hangman.exe
source code:
http://rapidshare.com/files/41654454/CEF_hangman.cpp
|
|
| Back to top |
|
 |
DeltaFlyer Grandmaster Cheater
Reputation: 0
Joined: 22 Jul 2006 Posts: 666
|
Posted: Sat Jul 07, 2007 9:46 pm Post subject: |
|
|
I REALLY suggest that you read up on functions and procedures. Your code looks like it went through a compiler with the parameter to make all functions inline. Using functions, your code should be approximately 100 lines in total.
Also, instead of writing the 20 nested if's, make a boolean and use a loop to check for equality, it will be much more readable. Or even better, make that array of strings into an array of chars. You can then just use the strcmp function to compare the string.
_________________
Wow.... still working at 827... what's INCA thinking?
zomg l33t hax at this place (IE only). Over 150 people have used it, what are YOU waiting for? |
|
| Back to top |
|
 |
eagles358 Expert Cheater
Reputation: 0
Joined: 10 Apr 2007 Posts: 174
|
Posted: Sat Jul 07, 2007 10:04 pm Post subject: |
|
|
| thanks for the tips, ill work on it. The 20 ifs should be easy to fix, and ill work on using functions.
|
|
| Back to top |
|
 |
|
|
You cannot post new topics in this forum You cannot reply to topics in this forum You cannot edit your posts in this forum You cannot delete your posts in this forum You cannot vote in polls in this forum You cannot attach files in this forum You can download files in this forum
|
|