
-----------------------------------
Imajica
Sun Mar 21, 2004 7:46 am

Relational operator overloading
-----------------------------------
All of my overloaded relational operators return a "false" when tested w/ the instructors driver. My code appears to be valid. I have no idea what is causing this.

#ifndef DATE_H
#define DATE_H
#include
using std::ostream;
using std::istream;

class Date {
friend ostream &operator(istream &, Date &);

public:
	Date(int m = 1, int d = 1, int y = 1);
	Date(const Date &);

	void setMonth(int);
	void setDay(int);
	void setDate(int, int, int );
	void setYear(int);
	const int getMonth()const{return month;}
	const int getDay()const{return day;}
	const int getYear()const{return year;}
	int operator 12  )
	{
		cout dy >> c >> yr ;

  d.setDate(mo, dy, yr);
 
   return input;   
}


#include"Date.h"
#include
using std::cout;
using std::cin;
#include

void relational();

Date date1, date2, result;

int main()
{
	relational();

return 0;
}

void relational()
{
	char yn[100], op[4], answer[6];
	do 
	{
		cout > date1 >> op >> date2;

	 if ( strcmp( op, "