I have come a cross different ways of writing a functions e.g. consider main function in following ways
int main()
{
some thing here;
return 0;
}
Second and third variant could be like
void main()
{
some thing here;
}
int main(int argv , char *argc[])
{
some thing here;
return 0;
}
So how can someone possibly write a single function in different ways? Which could cause errors in my opinion ?
How to write such functions ? Is is similar to overloading overloading or overwriting concept in java ? Is there a facility to use a single name for many functions ? Please provide an example of using such functions ?