通过引用传递参数时,我不理解此错误

时间:2018-09-19 14:18:49

标签: c++ generalization

我正在尝试在另一个文件(main.cc)中运行该程序,但在此类上却出现错误,这是错误。

错误

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

代码来源:

class Library{

public:

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

0 个答案:

没有答案