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



LinkBack URL
About LinkBacks




