You might be better off creating unique classes for each type of gate, eg:
1 2 3 4 5
class AND_gate {
};
class OR_gate {
};
then having the class be responsible for constructing the truth table correctly.
This is probably going to require inheritance, polymorphism, and a virtual function or two, so if you are not
familiar with those concepts, then don't even bother.
Now, I'm not real sure how you intend on using the truthTable_ member, given that it is just a vector.
Gates take two binary inputs -- a and b. Are you intending on concatenating the two values to form
an integer which you'll use as an index into the vector?
My header file is fixed, so I can not create unique classes. I want to store only outputs (for example for and gate for 00 01 10 11 inputs I want to store only 0001 in the vector) for not only 2 input gates also n input gates