Archived

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

darkawakenings

using the '...' in the argument list

Recommended Posts

darkawakenings    127
I was just wondering how I could use the ellipses to accept an unlimited amount of arguments with a function. I tried void func(char aaa, char aab, ...); and it compiled fine, but now if I pass four variables to it, i don''t know how to access the other two. Thanks in advance!

Share this post


Link to post
Share on other sites
chiuyan    122
look up va_list and va_arg in your msdn, or check it out online at [big url]

http://msdn.microsoft.com/library/default.asp?url=/library/en-us/vccore98/html/_crt_va_arg.2c_.va_end.2c_.va_start.asp

Share this post


Link to post
Share on other sites