#include "calculator.h" // <- should have a; here
class Rational; // <- remove this;
{
* * *Rational::Rational(const Rational rat) *// <- move this function definition outside the class body
* * *{ * * * * * * * * * * * * * * * * * * * * * * * * * *
* * * * * *temp* Rational = new Rational; // did you mean Rational *temp?
* * * }; // <- unnecessary;
};
also your copy constructor looks bad. i think it will not compile. argument should be:
Rational(const Rational &rat)
on the issue of pasting text, try highlighting the text you want to copy, then middle click to paste (make sure the text is still highlighted).