rational_main.cc

rational_main.cc - Rational r3; r2 = r3 = r1.add(r2); cout...

Info iconThis preview shows page 1. Sign up to view the full content.

View Full Document Right Arrow Icon
#include <iostream> #include "rational.h" using namespace std; int main(int argc, char* args[]) { Rational r1(1, 2); cout << r1; Rational r2(3, 4); cout << r2;
Background image of page 1
This is the end of the preview. Sign up to access the rest of the document.

Unformatted text preview: Rational r3; r2 = r3 = r1.add(r2); cout &lt;&lt; r3; // Rational r4; //r4 = r1 + r2; // r1.operator+(r2) //cout &lt;&lt; r4 &lt;&lt; endl; }...
View Full Document

Ask a homework question - tutors are online