Cheat Engine Forum Index Cheat Engine
The Official Site of Cheat Engine
 
 FAQFAQ   SearchSearch   MemberlistMemberlist   UsergroupsUsergroups   RegisterRegister 
 ProfileProfile   Log in to check your private messagesLog in to check your private messages   Log inLog in 


CEF Hangman game, made in c++

 
Post new topic   Reply to topic    Cheat Engine Forum Index -> General programming
View previous topic :: View next topic  
Author Message
eagles358
Expert Cheater
Reputation: 0

Joined: 10 Apr 2007
Posts: 174

PostPosted: Sat Jul 07, 2007 8:23 pm    Post subject: CEF Hangman game, made in c++ Reply with quote

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
View user's profile Send private message
DeltaFlyer
Grandmaster Cheater
Reputation: 0

Joined: 22 Jul 2006
Posts: 666

PostPosted: Sat Jul 07, 2007 9:46 pm    Post subject: Reply with quote

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
View user's profile Send private message
eagles358
Expert Cheater
Reputation: 0

Joined: 10 Apr 2007
Posts: 174

PostPosted: Sat Jul 07, 2007 10:04 pm    Post subject: Reply with quote

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
View user's profile Send private message
Display posts from previous:   
Post new topic   Reply to topic    Cheat Engine Forum Index -> General programming All times are GMT - 6 Hours
Page 1 of 1

 
Jump to:  
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


Powered by phpBB © 2001, 2005 phpBB Group

CE Wiki   IRC (#CEF)   Twitter
Third party websites