Thread: please see the random number gen difficult post

  1. #1
    Registered User
    Join Date
    Apr 2010
    Posts
    79

    please see the random number gen difficult post

    What I am getting is
    gcc -o check -Wall -Wextra gauss2.c GENER01.c check.c -lm
    gauss2.c: In function ‘gauss2’:
    gauss2.c:8: warning: unused variable ‘temp’
    check.c:13: warning: return type defaults to ‘int’
    check.c: In function ‘main’:
    check.c:22: warning: implicit declaration of function ‘settable’
    check.c:30: warning: control reaches end of non-void function

  2. #2
    Registered User
    Join Date
    Oct 2008
    Posts
    1,262
    Maybe you should simply copy the code here...

  3. #3
    and the hat of int overfl Salem's Avatar
    Join Date
    Aug 2001
    Location
    The edge of the known universe
    Posts
    39,660
    > gauss2.c:8: warning: unused variable ‘temp’
    So delete it then, if you're not using it

    > check.c:13: warning: return type defaults to ‘int’
    So make it explicitly return int, rather than being vague about it.

    > check.c:22: warning: implicit declaration of function ‘settable’
    So declare it already!

    > check.c:30: warning: control reaches end of non-void function
    So look where you're returning, and make sure every path has a value.
    If you dance barefoot on the broken glass of undefined behaviour, you've got to expect the occasional cut.
    If at first you don't succeed, try writing your phone number on the exam paper.

Popular pages Recent additions subscribe to a feed

Similar Threads

  1. random number generator help
    By mayoussa89 in forum C++ Programming
    Replies: 2
    Last Post: 04-16-2010, 07:26 AM
  2. couple questions for very small random number program
    By nick753 in forum C++ Programming
    Replies: 7
    Last Post: 01-17-2010, 09:35 PM
  3. adding a number to a number
    By bigmac(rexdale) in forum C Programming
    Replies: 11
    Last Post: 10-24-2007, 12:56 PM
  4. Issue w/ Guess My Number Program
    By mkylman in forum C++ Programming
    Replies: 5
    Last Post: 08-23-2007, 01:31 AM
  5. random number
    By mrukok in forum C++ Programming
    Replies: 7
    Last Post: 03-16-2003, 08:04 PM