1 2 3 4 5 6 7 8 9 10 11 12 13 14 15 16 17 18 19 20 21 22 23 24 25 26 27 28 29 30 31 32 33
|
int main()
{
// const Date pub_date(1,2,2003);
// const Author alice("Alice", "Kray");
// const Author jaina("Jaina", "Proudmore");
// const vector<Author> authors = {alice,jaina};
//
// const Book children_book("Kids Tales", authors, pub_date, true);
// cout << children_book.to_string();
string title;
string first_name;
string last_name;
int MM;
int DD;
int YYYY;
cout << "Enter the title of the book.\n";
getline(cin,title);
cout << "Enter the author of the book. (First name followed by last name)\n.";
cin >> first_name >> last_name;
cout << "Enter the publication date of the book. (MM DD YYYY) If a month ony has 1 digit, enter only that digit.\n";
cin >> MM >> DD >> YYYY;
const Date pub_date(MM,DD,YYYY);
const Author firstauthor (first_name,last_name);
const vector<Author> authors {firstauthor};
new const Book newbook1(title, authors, pub_date,true); //error arises here.
}
|