rational.h - Rational operator+(const Rational& r);...

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

View Full Document Right Arrow Icon
#ifndef RATIONAL_H #define RATIONAL_H #include <iostream> using namespace std; class Rational { public: Rational(); Rational(int, int); Rational(const Rational& rhs); ~Rational(); Rational& operator=(const Rational& rhs); void display(ostream&) const; Rational add(const Rational& r);
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 operator+(const Rational& r); //friend Rational operator+(const Rational& lhs, const Rational& rhs); friend ostream& operator<<(ostream& os, const Rational& r); private: int num; int dem; }; #endif...
View Full Document

This note was uploaded on 04/19/2008 for the course CS 265 taught by Professor Daniele.stevenson during the Spring '08 term at Wisc Eau Claire.

Ask a homework question - tutors are online