My question is: how can we make an operator function, which is not a member of a class, access private data members of class or do manipulations on objects of class? and why do we use such operator function?
But it means that the friend function has to be declared 'inside' the class at least... Can't I declare and define it 'outside' the class, in main body?
No, that's because only the implementor of the class can decide which functions can access private members
( otherwise it wouldn't make sense to have them private )