I know this is kinda OT, but there seems to be a lot of C programmers here so you may be able to ask my lame-wad question.
How would I go about putting in error checking to not allow someone to enter any letters when they're supposed to be entering numbers? I'm using pointers, so things seem to go spasticated when someone does try and enter letters.
It's only my first year of C (I'm in 2nd year - we did Pascal for first year - DON'T ASK!), so I'd say you would find it easy ^_^
Sorry AntiPasta, I was thinking for some reason that only C++ has libraries. I'm using stdio.h, stdlib.h and conio.h - it's Turbo C++ 3 by the way. I might try the getch() thing, but it's still gonna make things a lot more complicated, especially with the amount of numbers i need to get inputs from. I'll ask my lecturer if I actually need to do this - he said we need to include checking for erronious numbers (e.g. putting in end times that occur before start times) but I'm not sure if we have to go this far.
Thanks for the help anyway!
POST SOME CODE!!
Will make you looking like you know C like a pro does.
it's just like scanf(%d, whatever)...
ok, hehe.
Maybe you should change it to a string "%s" and then do a simple loop though it to make sure each character is a valid letter (code example i posted).
thats a simple way that is basic and will let you verify its valid quickly.