Default value of function parameter

Posted by httpinterpret on Stack Overflow See other posts from Stack Overflow or by httpinterpret
Published on 2010-05-16T07:31:48Z Indexed on 2010/05/16 7:40 UTC
Read the original article Hit count: 145

Filed under:
|

1.

int Add (int a, int b = 3);
int Add (int a, int b)
{

}

2.

int Add (int a, int b);
int Add (int a, int b = 3)
{

}

Both work,which is the standard way and why?

© Stack Overflow or respective owner

Related posts about c++

Related posts about syntax