Anonymous Anonymous - 3 months ago
382 0

No description

Other

C++ Assignment Output

Compiling and running ~/NTNU/NTNU-IINI4003/assignment_5/build/assignment_5
Scanning dependencies of target assignment_5
[ 50%] Building CXX object CMakeFiles/assignment_5.dir/main.cpp.o
In file included from /usr/include/c++/9/memory:80,
                 from /home/aurora/NTNU/NTNU-IINI4003/assignment_5/main.cpp:2:
/usr/include/c++/9/bits/unique_ptr.h: In instantiation of ‘typename std::_MakeUniq<_Tp>::__single_object std::make_unique(_Args&& ...) [with _Tp = ChessBoard::King; _Args = {ChessBoard::Color}; typename std::_MakeUniq<_Tp>::__single_object = std::unique_ptr<ChessBoard::King, std::default_delete<ChessBoard::King> >]’:
/home/aurora/NTNU/NTNU-IINI4003/assignment_5/main.cpp:120:79:   required from here
/usr/include/c++/9/bits/unique_ptr.h:857:30: error: no matching function for call to ‘ChessBoard::King::King(ChessBoard::Color)’
  857 |     { return unique_ptr<_Tp>(new _Tp(std::forward<_Args>(__args)...)); }
      |                              ^~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
/home/aurora/NTNU/NTNU-IINI4003/assignment_5/main.cpp:33:9: note: candidate: ‘constexpr ChessBoard::King::King(const ChessBoard::King&)’
   33 |   class King : public Piece {
      |         ^~~~
/home/aurora/NTNU/NTNU-IINI4003/assignment_5/main.cpp:33:9: note:   no known conversion for argument 1 from ‘ChessBoard::Color’ to ‘const ChessBoard::King&’
/home/aurora/NTNU/NTNU-IINI4003/assignment_5/main.cpp:33:9: note: candidate: ‘constexpr ChessBoard::King::King(ChessBoard::King&&)’
/home/aurora/NTNU/NTNU-IINI4003/assignment_5/main.cpp:33:9: note:   no known conversion for argument 1 from ‘ChessBoard::Color’ to ‘ChessBoard::King&&’
In file included from /usr/include/c++/9/memory:80,
                 from /home/aurora/NTNU/NTNU-IINI4003/assignment_5/main.cpp:2:
/usr/include/c++/9/bits/unique_ptr.h: In instantiation of ‘typename std::_MakeUniq<_Tp>::__single_object std::make_unique(_Args&& ...) [with _Tp = ChessBoard::Knight; _Args = {ChessBoard::Color}; typename std::_MakeUniq<_Tp>::__single_object = std::unique_ptr<ChessBoard::Knight, std::default_delete<ChessBoard::Knight> >]’:
/home/aurora/NTNU/NTNU-IINI4003/assignment_5/main.cpp:121:81:   required from here
/usr/include/c++/9/bits/unique_ptr.h:857:30: error: no matching function for call to ‘ChessBoard::Knight::Knight(ChessBoard::Color)’
  857 |     { return unique_ptr<_Tp>(new _Tp(std::forward<_Args>(__args)...)); }
      |                              ^~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
/home/aurora/NTNU/NTNU-IINI4003/assignment_5/main.cpp:53:9: note: candidate: ‘constexpr ChessBoard::Knight::Knight(const ChessBoard::Knight&)’
   53 |   class Knight : public Piece {
      |         ^~~~~~
/home/aurora/NTNU/NTNU-IINI4003/assignment_5/main.cpp:53:9: note:   no known conversion for argument 1 from ‘ChessBoard::Color’ to ‘const ChessBoard::Knight&’
/home/aurora/NTNU/NTNU-IINI4003/assignment_5/main.cpp:53:9: note: candidate: ‘constexpr ChessBoard::Knight::Knight(ChessBoard::Knight&&)’
/home/aurora/NTNU/NTNU-IINI4003/assignment_5/main.cpp:53:9: note:   no known conversion for argument 1 from ‘ChessBoard::Color’ to ‘ChessBoard::Knight&&’
make[2]: *** [CMakeFiles/assignment_5.dir/build.make:63: CMakeFiles/assignment_5.dir/main.cpp.o] Error 1
make[1]: *** [CMakeFiles/Makefile2:76: CMakeFiles/assignment_5.dir/all] Error 2
make: *** [Makefile:84: all] Error 2
Recommended from our users: Dynamic Network Monitoring from WhatsUp Gold from IPSwitch. Free Download