You're providing two definitions of AND::output
. One in the header, which is empty, and another in the implementation file, which is not empty. Looks like your header should have:
bool output(bool A, bool B);
Note that you will not be able to use these output
functions polymorphically because they do not have the same arguments as the declaration in Gate
.