I have found a lot of tutorials/snippets online, that suggest to use an overloading of this type:
NumeroFarlocco operator+(NumeroFarlocco n1, NumeroFarlocco n2) { ... }
But if I put this definition in my .h file:
NumeroFarlocco operator+(NumeroFarlocco n1, NumeroFarlocco n2);
I have this error: http://msdn.microsoft.com/it-it/library/1zy85x1e(v=vs.80).aspx
So I have figured out I have to define the overloading like this:
NumeroFarlocco operator+( NumeroFarlocco n2 );
but in the implementation I can't understand how to access the instance variables of the first element involved in the operation (the one that was n1 in my previous code), this->variable does not work, neither variable ...