I'm not sure I know how to ask this.
say I have a function
void myFunc ( int8 foo, float bar, int whatever )
{
...
}
is there a quick way of referencing a particular argument by its position?
void myFunc ( float foo, float bar, float whatever )
{
float f;
f = ARG[1]; // f now equals bar
}
something to that effect?
Follow up:
Thank you for your answers folks. I guess I'm going about it wrong. I find it odd that c++ doesn't allow for this, as perl and some psuedo languages (I'm thinking in particular of AutoIt) do. So as for "why"? Just to use a simple loop to go through them. I recognize that there are a myriad of better ways to achieve this in normal circumstances, but I was trying my darndest to not modify anyone's code outside of my little world. In other words I don't have control over the calling code. It is shoving the inputs down my throat and I have to manage them as best as possible. So I can't just loop before calling my function. Anyway, it was clearly going to be a mess and there weren't that many variables so I just duplicated code. No biggy. Thanks for the comments and interesting suggestions.