View Single Post
  #2 (permalink)  
Old July 26th, 2003, 01:30 AM
Ankur_Verma Ankur_Verma is offline
Friend of Wrox
 
Join Date: Jun 2003
Posts: 453
Thanks: 0
Thanked 1 Time in 1 Post
Send a message via AIM to Ankur_Verma Send a message via MSN to Ankur_Verma
Default

Hi Nigor

Firstly the signature of the function is such that
the caller of the function will HAVE to provide
values for both of the paramerters, or the function call
will give error at compilation. still, to be on the safer side
give default values to the parameters like this
int text(int x, int y = 0)

this declaration lets the caller call the the function
without supplying the value for the second parameter yet
the parameter will get initialized with zero.
but it all depends whether you want to let anybody
call your function that way.

Write back if there is anything else you wanna ask.


Ankur Verma
.Net and C++ Specialist
Wiley Tech Support
Reply With Quote