שלום,שאלה ../images/Emo13.gif
ציטוט מהספר ++thinking in c :
ציטוט מהספר ++thinking in c :
In C++, an argument may be unnamed in the argument list of the function definition. Since it is unnamed, you cannot use it in the function body, of course. Unnamed arguments are allowed to give the programmer a way to “reserve space in the argument list.” Whoever uses the function must still call the function with the proper arguments. However, the person creating the function can then use the argument in the future without forcing modification of code that calls the function.
לא הבנתי מה יוצא לי מכך שאפשרי לכתוב פונקציות ולא לתת לערכים הנשלחים לפונקציה, שם ? הרי גם ככה אי אפשר להשתמש במשתני הנשלחים אל הפונקציה מפני שאין להם שם. אז מה אני כן יכול להרוויח מזה? תודה רבה.