please see the random number gen difficult post

This is a discussion on please see the random number gen difficult post within the C Programming forums, part of the General Programming Boards category; 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: ...

  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 wrongness Salem's Avatar
    Join Date
    Aug 2001
    Location
    The edge of the known universe
    Posts
    32,548
    > 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.
    I support http://www.ukip.org/ as the first necessary step to a free Europe.

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, 08: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, 07:04 PM

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