The error means that you have declared no-argument constructors of Book
and Student
, but you never provided an implementation.
You need to write code in the cpp files for these constructors to fix the link error, or provide an inline implementation in the header, or remove the declaration of the no-arg constructors, and make one of the other constructors the default by providing default values for all its arguments.
Note: having a constructor of the Book
that takes among other parameters a student ID looks highly suspicious, because the Book
object becomes aware of the association with a Student
object. Ideally, this association should be kept outside Book
and Student
class.