I don't understand this error when passing paramters by reference

97 views Asked by At

I'm trying to run this program in another file(main.cc) but I get an error on this class, where this is the error.

ERROR

./Library.h:15:24: error: expected ')'
    Library(Book[] &book, int &currentNumOfBooks);
                   ^
./Library.h:15:16: note: to match this '('
        Library(Book[] &book, int &currentNumOfBooks);
               ^

CODE SOURCE:

class Library{

public:

    Book booksLibrary[MAX_ARR_SIZE];
    int currentNumOfBooksLibrary;
    Library();
    Library(Book[] &book, int &currentNumOfBooks);
    void addBook(Book &book);
    void print();
private:
}:
0

There are 0 answers