Saturday, May 22, 2010

How do i check inputs against input types in c? i use gcc as my compiler.. thanks?

Maybe I don't know C as well as I sometimes imagine I do, but it sound like you are asking for two different things.





The C "equivalent" of Java's "public static int parseInt(String s)" is C's " int atoi(const char *str)", part of stdlib.h.





Is that what you were looking for?





If you are trying to type check inputs, that is something different (isn't it?)





This is a decent bit on input data validation (necessary because C is very weak on types).


http://goforit.unk.edu/cprogram/c_055.ht...


http://goforit.unk.edu/cprogram/c_032.ht...


No comments:

Post a Comment