#include "rational.h"
int main()
{
CRational a(1, 4);
CRational b(3, 4);
CRational c = a.Addition(b);
c.Print();
c.Reduction(); c.Print();
CRational d = c; d.Print();
CRational e(c); e.Print();
return 0;
}
-D_DEBUG
option, the output may
look like
Constructor(1,4) called
Constructor(3,4) called
Copy Constructor(3,4) called
Constructor(0,1) called
16/16
1
Copy Constructor(1,1) called
1
Copy Constructor(1,1) called
1