I am getting input from terminal using "char *argv[]" parameter in main function. Now, I want to check whether all the inputs are not character (they are not necessarily int, they can be double) but I don't know how to do it here because inputs are pointers and it's not straightforward like when you get inputs from scanf() so just checking the ascii characters or something like that. Could someone help me with the issue?
hg_fs2002
13
Light Poster
Recommended Answers
Jump to Postargv[1] is a pointer to a string, if you want the first character in the string then it's argv[1][0]
this makes more sense anyway
argv[1][0] < '0' || argv[1][0] > '9'
All 3 Replies
Ancient Dragon
5,243
Achieved Level 70
Team Colleague
Featured Poster
hg_fs2002
13
Light Poster
Ancient Dragon
5,243
Achieved Level 70
Team Colleague
Featured Poster
Be a part of the DaniWeb community
We're a friendly, industry-focused community of developers, IT pros, digital marketers, and technology enthusiasts meeting, networking, learning, and sharing knowledge.