1

I have a function which takes two variables:

call((void**) &var, float);
call((void**) &var, int);
call((void**) &var, string);

Now I want to create a function to call that special function:

function start_call(/*what to put here?*/)
{
    call((void**) &var1, float);
    call((void**) &var2, int);
    call((void**) &var3, string);
     //code
}

So, what to put in the "what to put here?" place, in order for the function to accep any variable?

I tried my berst to explain it...

SkyRipper
  • 155
  • 5
  • 15

1 Answers1

1

You could use a template:

template <class T> start_call(T in);
chbaker0
  • 1,758
  • 2
  • 13
  • 27