passing extra parameter to operator function

Hello I have a class and I would like to be able to pass an extra parameter to the function that is executed.
1
2
3
BigInt operator / (BigInt N,BigInt D) {
  ...
}

is what I have now. but I would like to do something like this. so the default value for a is 10. and if the user does something like N/D (12) Then the value of a is 12. I don't know the exact way to do this or if that is even possible. Any help is welcome. feel free to ask if something is not clear.
1
2
3
BigInt operator / (BigInt N,BigInt D, int a=10) {
  ...
}
The / operator always takes 2 arguments. If you want to pass more arguments you will have to use a normal function.
Last edited on
Okay thanks for the answer.
Topic archived. No new replies allowed.