Page 1 of 1

Function parameters

PostPosted: Wed Apr 05, 2006 11:49 am
by DilloDude
If i'm writing a function with parameters,
Code: Select all
void function(int param1, char *param2)
...
, how can I have it so it has two parameters, but you only enter 1? So if you enter a string, it will do one thing, but if you enter an integer, it will do another. Like in the sprintf function, you enter your strings and another variable, and it can be a string, a real or an integer variable.

PostPosted: Wed Apr 05, 2006 12:14 pm
by Fuzzy
I think Printf does something special, taking a single argument and breaking it down internally.