In the scenario 1 I must declare method on the top, but should I declare it in the scenario 2 also?
Scenario 1:
=========
Static void local_method(int param);
Void caller()
{
local_method(1);
}
Static void local_method(int param)
{
// doing something
}
Scenario 2:
/* I have define this method before caller, should I still declare its method signature above.
What is the benefit I will get if I declare it on the top */
Static void local_method(int param)
{
// doing something
}
Void caller()
{
local_method(1);
}
Scenario 1:
=========
Static void local_method(int param);
Void caller()
{
local_method(1);
}
Static void local_method(int param)
{
// doing something
}
Scenario 2:
/* I have define this method before caller, should I still declare its method signature above.
What is the benefit I will get if I declare it on the top */
Static void local_method(int param)
{
// doing something
}
Void caller()
{
local_method(1);
}










- carpe noctem