Hi there, I think this my first time For while I was working in learning Operator overloading but I still can’t figure it out. I did try several times by using different codes from various materials but still!! And this is one of my trial which doesn't work, so please if you don’t mind giving some tips on dealing with operator overloading and tell me what is the wrong with the code;! note: I did a search in the site about the issue before request my demand. Code: #include <iostream> using namespace std; using std::ostream; class Number{ friend ostream &operator<<(ostream &, const Number &); public: Number(); void setN(int); int getN()const; Number operator+(const Number &)const; private: int number; }; Number::Number(){number=0;} void Number::setN(int n){number=n;} int Number::getN()const {return number;} ostream &operator<<(ostream &output, const Number &num) { output<<num.number; return output; } Number Number::operator +(const Number &other)const { return *this + Number(other); } int main() { Number n1,n2; Number sum; n1.setN(3); n2.setN(4); cout<<": "<<n1.getN()<<endl; cout<<": "<<n2.getN()<<endl; sum= n1+n2; cout<<sum<<endl; return 0; } errors I got: 1.cannot access private member declared in class 'Number' 2. see declaration of 'number' 3. operator <<' is ambiguous