I think I am messing up somewhere between the pointers. I do not know if I am supposed to change Book* to something or not.
Any help will be appreciated. Thank You.
istream& operator >> (istream& is, Warehouse& warehouse){
int counter = 0;
Book* temp;
Book* headNode;
is >> headNode;
while (!is.eof()){
temp = headNode;
is>> headNode;
headNode.setNext(temp);
counter++;
}
warehouse.bookCount = counter;
warehouse.head = headNode;
return is;
}