Check out example codes for "c++ operator overloading too many parameters". It will help you in understanding the concepts better.

Code Example 1

friend ostream& operator<<(ostream& out, int x){
     out << names[x] << " " << ages[x] <<endl;
     return out;
}

Learn ReactJs, React Native from akashmittal.com