Okay, so it's me again
I have declared a vector and function within a class
Code:
vector<Book> Books;
void add_books(vector<Book>&);
I have defined the function within a .cpp file
Code:
void Library::add_books(vector<Book>& b)
{
//do something
}
However, when I call the function, I think I am passing the argument incorrectly. I have tried as such:
Code:
Library::add_books(Library::Books);
But I get the following error:
error C2597: illegal reference to non-static member 'Library::Books
Any wise words of wisdom?
Thanks.