Archived

This topic is now archived and is closed to further replies.

hello2k1

Dynamic amount of inputs

Recommended Posts

It's surprising how you can be programming for 4 years, and still learn something every day.. Anyways, my question is basically how to make an sprintf() type function, where the amount of inputs is based on what the function user needs. My format is somewhat like: function(CClass *class, void (*callback)(int x, DWORD y), BYTE bInputType, void *pInput, ...); In this case, I would need "BYTE bInputType, void *pInput" to be repeated. Thanks. [edited by - hello2k1 on August 12, 2002 1:30:02 PM]

Share this post


Link to post
Share on other sites
Ok, I''ve done some talking/searching, and I found out that I need to use the va_x functions/structs.. Still a little bit unclear about how to use them though. Any help would be appreciated.

Thanks.

Share this post


Link to post
Share on other sites