0
如推回使用存儲變量 書(書名,作者,ISBN)有沒有辦法push_back多個變量到for循環中的向量?
vector <Book> books;
Book book1("a", "Jim John", 1000);
Book book2("b", "Jim John", 1001);
Book book3("c", "Billy Bill", 1002);
Book book4("d", "Greg Lumburge", 1003);
Book book5("e", "Dallas Orange", 1004);
Book book6("f", "Old McDonald", 1005);
books.push_back(book1);
books.push_back(book2);
books.push_back(book3);
books.push_back(book4);
books.push_back(book5);
books.push_back(book6);