> recently, i write a small program that must enter numeric only, so i use isalpha(...) and ispunct(...) to test the input(as string), but the ispunct() seem not working, y?
: > recently, i write a small program that must enter numeric only, so i use isalpha(...) and ispunct(...) to test the input(as string), but the ispunct() seem not working, y?
Why don't you use atoi () instead? If you simply must use ispunct (), make sure you're including the ctype.h include file.
Comments
Why don't you use atoi () instead? If you simply must use ispunct (), make sure you're including the ctype.h include file.
-Xotor-