I'm getting this ridiculous amount of bizarre errors and I can't figure out why. I have 2 classes and a main file I'm working with here... One class is called "Date" and the other is "Homework". The Homework class makes use of the Date class, which has already been tested and works fine.

The problems seems to be coming from when I overloaded the << operator for "Homework". Not so much the signature or anything, but what I have inside of that method.

These are some of the errors I get: The other errors seem to be just repeats or warnings.

Code:
Homework.h: In function ‘std::ostream& operator<<(std::ostream&, Homework&)’:
Homework.h:92: error: no match for ‘operator<<’ in ‘std::operator<< [with _Traits = std::char_traits<char>]
(((std::basic_ostream<char, std::char_traits<char> >&)(+ output)), ((const char*)", assigned ")) << (+ homework)->Homework::getAssignedDate()’

/usr/include/c++/4.0.2/bits/ostream.tcc:67: note: candidates are: std::basic_ostream<_CharT, _Traits>& std::basic_ostream<_CharT, _Traits>::
operator<<(std::basic_ostream<_CharT, _Traits>& (*)(std::basic_ostream<_CharT, _Traits>&))
 [with _CharT = char, _Traits = std::char_traits<char>]

Here's my main file:
Code:
#include <iostream>
#include "Date.h"
#include "Homework.h"

using namespace std;

int main(void){
	Date assigned(1,1,2006);
	Date due(4,1,2006);
	
	Homework ex1("exercise 1", assigned, due);

//This line seems to be causing all of the problems.
	cout << ex1;

	cin.get();
	return 0;
}
My definition of operator<< in class "Homework"
Code:
ostream& operator<<(ostream& output, Homework& homework){
	output << homework.getName();
	output << ", assigned " << homework.getAssignedDate();
	output << ", due " << homework.getDueDate() << ".";
	
	return output;
}
In case it helps to know, I declare the operator<< function correctly in "Homework" with this signature:

Code:
friend ostream& operator<<(ostream& output, Homework& homework);
Anybody have any ideas of what's wrong here? Because I'm stumped. Thanks in advance.