0
what is operator overloading??
unary binary and static operators...
1 Odpowiedź
+ 3
Operator overloading is just a way to make a function work with multiple types. Id est:
int rect(int length, int width) {
return length * width
}
// But you can only give it integers...
double rect(double length, double width) {
return length * width
}
// Violã! Now the same function can
// use integers or doubles.