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...
Type: Posts; User: DMD85
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...
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...
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...
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.
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)
...