Well, I have a small problem with checking the data type input by user. I want to make sure that the data got from keyboard must be "int" type. If User gives us another data types such as "char", "float, etc the program should report an error!!! :!:

Member Avatar for iamthwee

Well, I have a small problem with checking the data type input by user. I want to make sure that the data got from keyboard must be "int" type. If User gives us another data types such as "char", "float, etc the program should report an error!!! :!:

Before you pass it onto the next stage make sure the input doesn't contain anything but numbers from 0-9.

Write your own function or adapt one already in the c library.

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.