Ive Checked for typos Multiple times i don't understand why I'm receiving this error in main. I'm creating a new object and trying to call the object with a separate function but receive an undefined reference error.
Im Receiving the following error when compiling
/tmp/cceicIWu.o: In function `main':
RationalFractionTest.cpp:(.text+0xc9): undefined reference to `RationalFraction::displayFraction()'
collect2: ld returned 1 exit status
RationalFractionTest.cpp:
#include<iostream>
#include<iomanip>
using namespace std;
#include "RationalFraction.h"
#include "Program5.cpp"
//function main begins program execution
int main()
{
RationalFraction one(1,-2);
one.displayFraction();
}
RationalFraction.h:
#include<string>
 using namespace std;
//RationalFraction class definition
  class RationalFraction
  {
  public:
        RationalFraction(int a, int b); //Constuctor
        static RationalFraction add ( RationalFraction one, RationalFraction two);
        static RationalFraction subtract ( RationalFraction one, RationalFraction two);
        static RationalFraction multiply ( RationalFraction one, RationalFraction two);
        static RationalFraction divide ( RationalFraction one, RationalFraction two);
        void displayFraction(); // This will also reduce the fraction using GCD, and give decimal equivalent
  private:
        int top;
        int bottom;
  };
Program5.cpp:
RationalFraction::RationalFraction(int a, int b)
{
}
RationalFraction RationalFraction::add(RationalFraction one, RationalFraction two)
{
}
RationalFraction RationalFraction::subtract(RationalFraction one, RationalFraction two)
{
}
RationalFraction RationalFraction::multiply(RationalFraction one, RationalFraction two)
{
   int newtop;
   int newbottom;
   newtop = one.top * two.top;
   newbottom = one.bottom * two.bottom;
   float result = float (newtop) / float (newbottom);
   cout << "Fraction is " << newtop << "/" << newbottom << ". Which is decimal " << fixed << setw(5)
               << setprecision(4) << result << endl;
   RationalFraction newRationalFraction(newtop, newbottom);
   return newRationalFraction;
}
RationalFraction RationalFraction::divide(RationalFraction one, RationalFraction two)
{
}
void displayFraction()
{
cout<<"here";
}
