On Tue, Jun 21, 2011 at 10:39 AM, Viet Hung Nguyen <fami...@gmail.com> wrote:
> I intend to write a function like printf but i don't really know how: I first thought you were writing printf from scratch =) Even so, if you're interested, you'll have to use the ellipsis that allows an unlimited number of arguments to a function http://en.wikipedia.org/wiki/Stdarg.h Then you'll have to write a simple pattern recognizer to parse the format string ("%d %s") then process it accordingly. Good luck hacking ;) _______________________________________________ POST RULES : http://wiki.hanoilug.org/hanoilug:mailing_list_guidelines _______________________________________________ HanoiLUG mailing lists: http://lists.hanoilug.org/ HanoiLUG wiki: http://wiki.hanoilug.org/ HanoiLUG blog: http://blog.hanoilug.org/