if i want to check that wether the entered character is char type or int type,how can i do that?
nida afaq
0
Newbie Poster
Recommended Answers
Jump to PostI would read the input in as a string, then loop through each charcter in the string and check whats its value is using some boolean values to make note of things.
cctype header has some nice functions such as isalpha and is digit that will allow you to …
Jump to PostIf all characters are numbers from 0-9 then it is an int
otherwise it ain't.
All 6 Replies
nida afaq
0
Newbie Poster
Freaky_Chris
299
Master Poster
nida afaq
0
Newbie Poster
Freaky_Chris
commented:
3* same thread! Unacceptable
+0
iamthwee
Narue
5,707
Bad Cop
Team Colleague
Narue
5,707
Bad Cop
Team Colleague
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.