Question

6 views
Skip to first unread message

Muhammad Rafay Abdullah

unread,
May 11, 2013, 10:52:53 AM5/11/13
to cs1003-s...@googlegroups.com
Assalam u alikum:
                             Why it is not incorrect.
 void myfunc(double num = 0.0, char ch)

Sami Ullah Kashif

unread,
May 11, 2013, 12:16:43 PM5/11/13
to cs1003-s...@googlegroups.com
If you want to use default parameters, you can only do so from right to left, not left to right. So the correct declaration for the above function would be:

void myfunc(double num, char ch = ' ');


Regards,
Sami
Reply all
Reply to author
Forward
0 new messages