aman_49
aman_49

Reputation: 116

Default arguments syntax and general syntax in c++

What is the difference between below function prototype declarations?

int a(double = 0, double = 10);
int a(double j = 0, double a = 10);

Upvotes: 0

Views: 84

Answers (1)

Aykhan Hagverdili
Aykhan Hagverdili

Reputation: 29985

These are both function declarations. Parameter names in function declarations are purely for documentation. So there is no technical difference.

Upvotes: 6

Related Questions