Search:

Type: Posts; User: oogabooga

Search: Search took 0.01 seconds.

  1. Replies
    13
    Views
    3,812

    Add the -W and -Wall flags to your gcc command....

    Add the -W and -Wall flags to your gcc command.
    Do you get any warnings doing that?

    EDIT: I should mention that your program works fine for me.
  2. Replies
    13
    Views
    3,812

    Compiling with full warning should ferret out...

    Compiling with full warning should ferret out that possibility.
    With gcc, use:
    gcc -W -Wall yourprog.c
  3. Replies
    13
    Views
    3,812

    Yeah, I should have looked that up first. :) ...

    Yeah, I should have looked that up first. :)

    As for your point, it turns out that drand48 (and srand48) are declared in stdlib.h.
    I guess it's okay to add things to a standard library header.
  4. Replies
    13
    Views
    3,812

    Could it be because you're using %lf in fprintf...

    Could it be because you're using %lf in fprintf whereas you should be using %f ?
Results 1 to 4 of 4