Search:

Type: Posts; User: gipper

Search: Search took 0.00 seconds.

  1. Thread: Timer in C

    by gipper
    Replies
    5
    Views
    1,746

    You might try usleep() with an incrementing...

    You might try usleep() with an incrementing variable to visually time it. You will have to loop it. usleep() uses micro seconds so usleep(1000000) is one second. And you have to #include<unistd.h>.....
  2. Thread: Program help

    by gipper
    Replies
    6
    Views
    836

    I have had a lot of trouble in the past with...

    I have had a lot of trouble in the past with 'float'. I would recommend what anduril462 said. Or if you want, it might not hurt tying to use the 'double' variable instead of float. Not completely...
  3. Replies
    9
    Views
    970

    Hahahaha, Thanks.

    Hahahaha, Thanks.
  4. Replies
    9
    Views
    970

    Ahh, sorry. I completely read that wrong. I was...

    Ahh, sorry. I completely read that wrong. I was thinking he needed help with something else.
  5. Replies
    9
    Views
    970

    That is putting your number into a char array,...

    That is putting your number into a char array, then converting it to an integer. (num).
  6. Replies
    9
    Views
    970

    int get_number() { char buffer[100]; //array...

    int get_number() {
    char buffer[100]; //array that we are going to store the number in.
    int num;
    fgets(buffer, 100, stdin)
    sscanf(buffer, "%d", &num)
    return num;
    }


    This may help.
  7. Replies
    7
    Views
    3,335

    Ok, that does make sense. Haha just confusing at...

    Ok, that does make sense. Haha just confusing at first.
  8. Replies
    7
    Views
    3,335

    Well, all I needed is the asterisk. Wow, I don't...

    Well, all I needed is the asterisk. Wow, I don't understand why it was giving me that error.
    But it is fixed, Thanks for the help!
  9. Replies
    7
    Views
    3,335

    Error that does not make sense.

    I'm getting an error from comparing a character pointer and an integer.

    Heres some code.


    char *scan_array = &word[0];
    char letter;

    while(scan_array != letter) // This is the...
  10. Replies
    6
    Views
    1,211

    What do you mean "find" a program? Are you trying...

    What do you mean "find" a program? Are you trying to find someone to write a program for you?
  11. Replies
    11
    Views
    1,053

    Wow, Thanks sooo much! That sums all of it up. ...

    Wow, Thanks sooo much! That sums all of it up.

    So where you have "arrayPtr = array;" That will set the pointer to the first element? Wow.. That is way to easy.. Haha
    Thanks again! :)
  12. Replies
    11
    Views
    1,053

    Ok, thanks for the help. I think I should be set.

    Ok, thanks for the help. I think I should be set.
  13. Replies
    11
    Views
    1,053

    Thanks so much for the ideas. They will...

    Thanks so much for the ideas. They will definitely be put to use. But my biggest problem is that I don't know how to declare and initialize the pointers to the array.

    Yes, I do realize how easy...
  14. Replies
    11
    Views
    1,053

    *Number 50. Sorry... And yes, starting at the...

    *Number 50. Sorry...

    And yes, starting at the INDEX 0, and then incrementing one at a time throughout the array, till I find what I'm looking for, or NULL.

    I just need to know what kind of...
  15. Replies
    11
    Views
    1,053

    To find the actual number 50. And I would like to...

    To find the actual number 50. And I would like to do it recursively, starting at 0.
  16. Replies
    11
    Views
    1,053

    Referencing an array using s pointer?

    Hi, I need to get inside of an array and be able to increment the reference point.

    Would I need some kind of pointer?

    For example: If I have an array of 100, and I need to access 50,
    is there...
  17. I declared letter as a char, and i as an int. The...

    I declared letter as a char, and i as an int. The idea was to use i as an index to the array word[].
    If 'i' is equal to 0, and i say word[i] then it should access the first letter in the array...
  18. I honestly dont know how I can do that, i do know...

    I honestly dont know how I can do that, i do know that i cant compare an integer and a char. Thats what is happening here.

    Is there some kind of pointer that i could make to point to the location...
  19. In the class I'm in I was assigned to write...

    In the class I'm in I was assigned to write hang-man. So in the game I have char word[100] for the word that the user is guessing. And im taking in a single character every time the user guesses a...
  20. A string other than an array? Is that what your...

    A string other than an array? Is that what your saying?
  21. Accessing a char array, and comparing a letter, to each letter of a word.

    Hello, I know this is a super easy fix, I just cant for the life of me figure it out. I have and array,

    word[100];
    using an input function (not gets() don't worry) to put lets say 'superman'...
Results 1 to 21 of 22