Archived

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

using the '...' in the argument list

This topic is 5276 days old which is more than the 365 day threshold we allow for new replies. Please post a new topic.

If you intended to correct an error in the post then please contact us.

Recommended Posts

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
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