hi, I need 2 members similar:
but it contain 100 lines. Do I have to repeat the entire body of member twice? another way? thanks
Printable View
hi, I need 2 members similar:
but it contain 100 lines. Do I have to repeat the entire body of member twice? another way? thanks
You can use the default value and implement only one of the methods:
Code:
if(pd==0){ // no second parameter, act accordingly } }
Either that, or you can place the code common to both functions in a third (private) function and call it from both. Personally, I prefer it that way.