Search:

Type: Posts; User: achitan

Search: Search took 0.01 seconds.

  1. Replies
    25
    Views
    2,559

    Because I heard that calling rand() multiple...

    Because I heard that calling rand() multiple times will give you a sequence of random numbers that will repeat itself after a while (keeping the same seed). So it was just an exercise in statistics....
  2. Replies
    25
    Views
    2,559

    all cards on the table, I'm using g++ compiler in...

    all cards on the table, I'm using g++ compiler in an up-to-date Ubuntu 11.04 x_64 version
  3. Replies
    25
    Views
    2,559

    thank you

    Thank you, laserlight!
    I'll look into that. I'm new to C++ random number generation (also to C++, as a matter of fact).
  4. Replies
    25
    Views
    2,559

    the random number problem

    Hi, all!
    I really need a good random number generator for a baseball simulator (nothing fancy, just playing with probabilities). Currently I'm using the rand() function, and I've made a little test...
  5. Replies
    10
    Views
    9,006

    ok...thank you all for your input. I consider...

    ok...thank you all for your input. I consider this matter closed. I got it to work using #!/bin/bash at the beggining of the source file and I called it with ./source_file (I also added a chmod u+x...
  6. Replies
    10
    Views
    9,006

    more on this

    All great answers, thank you. I realize more and more that is a linux problem. Check this out:

    I am in bash and when I do which source I get nothing. Think that's weird? source a_file works.

    I...
  7. Replies
    10
    Views
    9,006

    system("source...") return value

    First thank you for responding so quickly. Your idea about /bash/sh before executing the system() command may be the winner. I have to check that.

    The return value of the system("source....")...
  8. Replies
    10
    Views
    9,006

    P.S. Forgot to mention something. The program...

    P.S.
    Forgot to mention something. The program compiles and works almost perfectly. The system("source...") is the only problem.
  9. Replies
    10
    Views
    9,006

    C system(...) function

    Hello, everybody!

    Here's a part of the code from a program I'm trying to do:



    #include <stdio.h>
    #include <stdlib.h>
    #include <string.h>
Results 1 to 9 of 9