simple input and string manipulation question
these are probably two fundamental questions but as I'm getting back into programming after 8 years its hard to rack my brain and also hard, without reference, to make head nore tale of some of the search results I've gotten :)
q1.) In C is there a simple way of controlling whehter the program only reads in numeric values and ignores alpha?
I tried to use the atoi boolean test but it sometimes messed up (my code probably dodgy) and was a pain in the neck having to add the checks after each input field.
q2.) again fundamental sorry. The tool I am doing reads in potentially up to 16 names. With the loops I have got I want to simply have the input placed into a variable which is then copied to a string array
for (count=0; count!=16; count++)
printf("\nPlease enter the %d interface name >",count);
Ok so this is a poor example but basically I need something after the scanf to copy interface value to the array. The line could then be recalled later.
Sorry its such a simple question but please can someone help?