This code is a Fraction that adds/subtracts multiple inputs of fractions. Here is my header file:
#ifndef FRACTION_H
#define FRACTION_H
#include <iostream>
using namespace std;
class Fraction{
    public: 
    Fraction(int , int );
    int fraction(int,int);
    void reduce_fraction(int *,  int *);
    Fraction& operator+(const Fraction&);
    Fraction& operator-(const Fraction&);
    friend ostream& operator<<(ostream &os, const  Fraction& n);
    friend istream& operator>>(istream &is, const Fraction& n);
};
#endif
and here is the overloading the operator code which results in an error of invalid initialization of non-const reference of type'Fractions&' from an rvalue of type 'Frations' for all three overloads
Fraction& Fraction::operator+(const Fraction& n) {
    int denom = *denomp * n.denom;
    int numera = (*nump * n.numera) + (n.denom * n.nump);
    return Fraction(numera,denom);
}
Fraction& Fraction::operator-(const Fraction& n) {
    int denom = *denomp * n.denom;
    int numera = (*nump * n.numera) - (n.denom* n.nump);
    return Fraction(numera, denom);
}
Fraction& Fraction::operator=(const Fraction& n){
    if(this==&n) return *this;
    return n;
}
 
     
    