Search:

Type: Posts; User: chickenandfries

Search: Search took 0.00 seconds.

  1. I realized that too. I tried modifying the code...

    I realized that too. I tried modifying the code to
    int generateRandInt() {
    int randInt=0, numOfLoops=rand()%537;
    for (int i=0; i<numOfLoops; ++i)
    randInt+=rand();
    return randInt;
    }
    and...
  2. generating random integers from 0 to 17576999

    RAND_MAX for my system is 32767 so rand() cannot generate an integer greater than this. The only method I think would work is


    int generateRandomInt() {
    int randomInt=0;
    for (int i=0; i<536;...
  3. "press any key to continue" without the enter key

    Is there a function that allows the program to proceed the user enters any key (may or may not be the enter key) without waiting for the enter key? It doesn't need to store the key entered. I'm gonna...
  4. What does setting all bits to the left binary...

    What does setting all bits to the left binary point to zero? What does it mean in "decimal language"?
  5. So w is just w=sizeof(int);?

    So w is just w=sizeof(int);?
  6. Wait, I'm kinda confused. How do I choose w? Put...

    Wait, I'm kinda confused. How do I choose w? Put in another way, how do I know the word size of the computer?
    Another thing, to generate the secondary hash function for double hashing, I need to...
  7. The process I posted is for producing the...

    The process I posted is for producing the secondary hash function to resolve collision. Before that is the process of producing the primary hash function; That could be the reason why the 1st step is...
  8. Multiply what by 32? the key?

    Multiply what by 32? the key?
  9. hash tables: multiplicative method with non-binary keys

    I'm trying to create a hash table and use the multiplicative method as a collision resolution. Our convention for the conversion of string data to numeric key is: a=01, b=02, c=03... So if the input...
  10. Replies
    12
    Views
    5,681

    Yes, I used lround() after performing floor(),...

    Yes, I used lround() after performing floor(), but the compiler indicated "undefined reference to lround".
  11. Replies
    12
    Views
    5,681

    casting worked! lround() doesn't seem to work...

    casting worked! lround() doesn't seem to work despite including math.h as a header file.
  12. Replies
    12
    Views
    5,681

    int floor(double)?

    is there a variation of the floor function that accepts a double parameter and returns an int?
  13. fmod() worked! Thanks matsp!!!

    fmod() worked!
    Thanks matsp!!!
  14. Compilation of the program failed. The compiler...

    Compilation of the program failed.
    The compiler indicated that modulus operation is not allowed with int and double as operands.
  15. I don't think that's a demand. I'm asking if...

    I don't think that's a demand.
    I'm asking if anyone knows whether &#37; works with double operands 'coz it's causing compile-time errors in my program.
    Also, I wouldn't ask that question if I haven't...
  16. modulus operator with double operands?

    Can the modulus operator work on double (data type) operands?
    If not, can anyone refer me to some website that gives c code which does the modulus operation on double operands?
    You may also suggest...
Results 1 to 16 of 16