Search:

Type: Posts; User: DMD85

Search: Search took 0.00 seconds.

  1. loops dont print on each indivual interation?

    Maybe this just shows how unexperienced i am with C ( very unexperienced)
    but im used to java where i could print something in each iteration of a loop. I was trying to get a load bar for a big...
  2. How to stop user from inputting negative number into unsigned long?

    I actually posted this code already for another problem and got some good help on it. But theres one more thing id like to do to make the input even better able to handle user error, but im not sure...
  3. Replies
    18
    Views
    2,737

    Okay thanks guys. Its for a class like you...

    Okay thanks guys. Its for a class like you mentioned. I was trying to get a bit fancy with the loop and checking input, but since we learned scanf() at this point specifically im not gonna get so...
  4. Replies
    18
    Views
    2,737

    what can i do to "consume" that letter/non...

    what can i do to "consume" that letter/non number? Ive actually already considered that as a possibilty and tried a couple of things that didnt work.
  5. Replies
    18
    Views
    2,737

    Checking input in a while loop...

    This is what I have for this particular function so far...



    unsigned long getNum(char prompt[80])
    {
    unsigned long darts;
    printf("%s", prompt);
    while((scanf("%lu", &darts)) != 1)
    ...
Results 1 to 5 of 5