int main() { Venue theSpot; theSpot.addEvent(10, "Coffee Hour"); //Should work -works! theSpot.addEvent(11, "Brunch w/ Bob"); //Should work -works! theSpot.addEvent(11, "Bingo"); //Shouldn't work -doesn't work! cout << theSpot.findEvent(10).getTitle() << endl; //Should find Coffee Hour -does! cout << theSpot.findEvent("Brunch w/ Bob").getTime() << endl; //Should find 11 o'clock -does! cout << theSpot.findEvent("Bingo").getTime() << endl; //Should print -1, because Bingo ain't there! -does! return 0; }
int main() { //Creates a venue to be utilized Venue theVenue; //Creates an event in the venue at 10 called wedding, displays "Event scheduled" theVenue.addEvent(10, "Wedding"); //Creates an event in the venue at 8 called business meeting, displays "Event scheduled" theVenue.addEvent(8, "Business Meeting"); //Will not create this event, because the time is already taken, displays error message theVenue.addEvent(10, "Poker Night"); //will find and display the event at 10, wedding cout << theVenue.findEvent(10).getTitle() << endl; //will find and display the event called business meeting, 8 cout << theVenue.findEvent("Business Meeting").getTime() << endl; //will return -1, because the event poker night does not exist cout << theVenue.findEvent("Poker Night").getTime() << endl; //will return Free, because there is no event at 6 cout << theVenue.findEvent(6).getTitle() << endl; return 0; }