void Add(vector< vector<string> > &name,
vector< vector<string> > &author,
vector< vector<string> > &pub,
int &total_books)
{
Line();
string book_name,book_author,book_pub;
cout << "Please enter the book name: ";
cin >> book_name;
cout << "Please enter the author name: ";
cin >> book_author;
cout << "Please enter the publisher name: ";
cin >> book_pub;
name.push_back(book_name);
author.push_back(book_author);
pub.push_back(book_pub);
++total_books;
cout << "The book has been successfully added.";
}
Compiler says this:
[Error] no matching function for call to
'std::vector<std::vector<std::basic_string<char> >>::push_back(std::string&)'**
Does anybody know what's the problem?