Thread: what does this error mean?

  1. #1
    Registered User
    Join Date
    Mar 2010
    Location
    Australia
    Posts
    174

    what does this error mean?

    Code:
    test1.c:22: error: 'one' is used uninitialized in this function
    one is a variable I assigned. I'm not sure what to make of this.

  2. #2
    Registered User
    Join Date
    Jun 2005
    Posts
    6,815
    It means you've declared a variable (one), not initialised it to have a value. Subsequent code in the function reads that value (or compares it with something).
    Right 98% of the time, and don't care about the other 3%.

    If I seem grumpy or unhelpful in reply to you, or tell you you need to demonstrate more effort before you can expect help, it is likely you deserve it. Suck it up, Buttercup, and read this, this, and this before posting again.

  3. #3
    Registered User
    Join Date
    Mar 2010
    Location
    Australia
    Posts
    174
    Oh thanks! I didn't know I had to give it a value first.

Popular pages Recent additions subscribe to a feed