what does this error mean?

This is a discussion on what does this error mean? within the C Programming forums, part of the General Programming Boards category; Code: test1.c:22: error: 'one' is used uninitialized in this function one is a variable I assigned. I'm not sure what ...

  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,252
    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%.

  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

1 2 3 4 5 6 7 8 9 10 11 12 13 14 15 16 17 18 19 20 21