I have a main file rational.cxx and a header file rational.h.
Everything seems to be working except i can't get the +=, *=, -=, and /= operators to work in the rational.cxx file.
I have a function in rational.h so I can use it which is below.
For example when I get to the point in the program where += is located in the rational.cxx file I get a Segmentation Fault. I can't find why it's doing this I'm hoping it's just a silly mistake I made. I forgot to say I'm using a class in the header file which is why I need to do this. So any help would be appreciated.Code:
int operator += (const rational& lhs, const rational& rhs)
return lhs += rhs;