Possible Duplicate:
function overloading in C
Apologies if this is a dup but if it is, I can't find it.
In C, can you define multiple functions with the same function name, but with different parameters? I come from a C# background. In C#, the following code is completely legal.
//Our first function
int MyFunction()
{
//Code here
return i;
}
int MyFunction(int passAParameter)
{
// Code using passAParameter
return i;
}
In my specific case, I would like to create a function that has one optional parameter (that is an int) at the end of the parameter list. Can this be done?