Coder Profile - Show off your skills, get a coder profile.
 
 
 
The Author
otoom
Ant
Send A Message
Rating
7.00
out of 10
( 1 Ratings )
Please login to rate source codes.

Click here to register a free account with us.
General Details
C++
Posted 2.45 Years Ago
882 Views
Received 1 Rating
More Codes By This Author
Guessing Game
Even or Odd
Even or Odd
Head First PHP And mySQL...
CreateSquare
Articles By This Author
Quick Threading Tutorial...
First look at C
Cheat Sheet Pack
[PHP] How to make a log f...
HTML Cheat Sheet!

Guessing Game


Description
Guess the number within your 3 attempts ;)

Bug: Once you guess it, it still asks for another guess, will be fixed.
Technical
C++
Source Code
Comments
Please login to post comments.
 
Uranium-239     Posted 2.25 Years Ago
 
 
Nice start, the layout of your code has room for improvment though.

You declare 'finished' (boolean) with global scope as a work around for
using functions properly. GuessFunc is declared as returning 'int' however,
it never does. I suggest you declare GuessFunc as returning 'bool', and use
its return value as opposed to hacking around that with global variables.
 
otoom     Posted 2.43 Years Ago
 
 
Thanks.
 
mikeMarek     Posted 2.43 Years Ago
 
 
Good job for a nice starting program
 
otoom     Posted 2.44 Years Ago
 
 
Not sure, i guess it's because i needed to use it in GuessFunc and main so i did
it that way.
 
smokey991     Posted 2.44 Years Ago
 
 
Why are you using finished as a global?
Page 1 of 1
More "C++" Source Codes By This Author
Recently Posted "C++" Source Codes
Recently Rated "C++" Source Codes
 
 
Latest News About Coder Profile
Coder Profile Poll
Why do you get bored with programming?

Not enough time to do something productive
I run out of ideas
Too hard to show people my creations
Everything i do has too many errors, and it's too hard
I don't get bored!!!


please login to cast your vote
and see the results of this poll
Latest Coder Profile Changes
Coder Profile was last updated
3.20 Years Ago
Official Blog :: Make A Donation :: Credits :: Contact Me
Terms & Conditions :: Privacy Policy :: Documents :: Wallpapers
Version 1.46.00
Copyright © 2007 - 2012, Scott Thompson, All Rights Reserved