I'm writing a code for finding truth table but there's an ambiguous error for conjunction(bool, bool), but I don't understand how I can make it right. Does anyone have any tips or comments about this? My code:
bool conjunction(bool, bool);
bool disjunction(bool, bool);
int main()
{
bool p, q, A, B, C, D;
for (int a = 0; a < 1; a++) {
A = a;
for (int b = 0; b < 1; b++) {
B = b;
for (int c = 0; c < 1; c++) {
C = c;
for (int d = 0; d < 1; d++) {
D = d;
cout << A << "|" << B << "|" << C << "|" << D << endl;
cout << conjunction(!A, B) << endl;
}
}
}
}
}
bool conjunction(bool p, bool q)
{
return p && q;
}
bool disjunction(bool p, bool q)
{
return p || q;
}