10
這是我在「solver.h」文件中的構造函數聲明。構造函數中的「No matching function call」
Solver(const Board &board_c, int max_moves_c);
當試圖編譯我碰到下面的錯誤...
solver.cpp: In constructor 'Solver::Solver(const Board&, int)':
solver.cpp:6:55: error: no matching function for call to 'Board::Board()'
Solver::Solver(const Board &board_c, int max_moves_c)
然後它列出了本屆董事會建設者候選人。
我不知道我在做什麼錯誤,因爲我沒有理由爲什麼我應該得到這個錯誤。
我正在用g ++編譯。