View Single Post
Old Oct 27th, 2004, 7:49 AM   #4
Draggan
Newbie
 
Join Date: Oct 2004
Posts: 1
Rep Power: 0 Draggan is on a distinguished road
Inside your class Rational should be your function declaration, not the actual definition of the constructor Rational. It should look (roughly) like this:

#include "calculator.h";

class Rational
{
Rational(const Rational &rat); // constructor prototype
};

Rational::Rational(const Rational &rat) // constructor definition
{
temp* Rational = new Rational; // No idea what you want to do here
}

// I haven't debugged this, go try it and see if it works. If you want this to work, both the calculator.h and this file would have to be in the same workspace.
Draggan is offline   Reply With Quote