Hello, I am working on a program that is using the type DATE to develop a class Event to model events scheduled for dates. This might be a familiar question to some, but, I have run into an error during the compile and I need help in debugging it. Below should be the components of the program:
//EventSchedule.ccp Use the type Date to develop a class Event.
#include <iostream>
#include <vector>
#include <algorithm>
#include "DateClass.h"
#include "EventsClass.h"
using namespace std;
int main()
{
char quit;
vector < pair <Date, Event> > eventDate;
vector < pair <Date, Event> >::iterator iter;
cout << "Enter the date of an event (format: mm/dd/yyyy) and the event name" << endl;
do{
Date dateIn;
Event eventIn;
cin >> dateIn >> eventIn;
eventDate.push_back(make_pair(dateIn, eventIn));
cout << "Do you have more entries? Enter 'y' or 'n'" << endl;
cin >> quit;
}while (quit != 'n');
sort(eventDate.begin(), eventDate.end());
while (iter != eventDate.end())
cout << *iter++;
system("PAUSE");
}
I am getting an error in the EventsClass.cpp at line(13) and (20):
error C2679: binary '>>' : no operator found which takes a right-hand operand of type 'std::string' (or there is no acceptable conversion)
and a similar error in the DateClass.cpp at lines (126) and the main at line (44).
I assume that fixing one of them might fix them all. But, I am at a lost as to which one to track down first.
Any help would be appreciated...and thanks in advance.