Functions with variable argument count..
I'm wondering if there is a way to deal with functions that can have a variable number of arguments passed to it. I already know of va_* functions but it doesn't seem that good. I was hoping there would be some way to restrict the data type to one data type, and also have random access to the arguments (va_* doesn't seem to have random access, unless you iterate through and copy it all to your own array first). It also seems that the va_* only works for basic data types and not my own class that i made.
Something like this:
Where "num" is the number of arguments passed and "varList" is an array of the arguments.
std::string FormatString(const std::string& format, int num, const Variable* varList, ...)
EDIT: err...nvm about the example, but is there any other methods for variable functions arguments? Would you have to use asm or something?