i want to build MyScanf

hi
i started to learn c and i build some library functions but now i want to build function that used like SCANF and i do not know how can i do it,
i know that i need a function that gets a string only %d %s %f %c allowd and pointer for output
can you help me do it?
thanks
It may not be easy. I suggest that you first write functions atoi, atof (conversion from string to int or float). Then have a little practice with va_list (see http://cplusplus.com/reference/clibrary/cstdarg/ ). Lastly, write sscanf (scanf that works with a string rather than console) so that you don't have to deal with input.
Topic archived. No new replies allowed.