View Single Post
Old Oct 27th, 2004, 6:33 AM   #2
jasper_ferrer
Newbie
 
Join Date: Sep 2004
Posts: 23
Rep Power: 0 jasper_ferrer is on a distinguished road
#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).
jasper_ferrer is offline   Reply With Quote