I am using an array in a simple logic simulator program and I want to switch to using a vector to learn it but the reference I am using \"OOP in C++ by Lafore\" doesn\'t hav
Yes, that will work - as long as you make run() a virtual function in gate and use the address of operator(&) on a and o as you put them in the vector.
Be careful about object lifetime issues though. If a and/or o go out of scope then your vector will contain pointers to invalid objects.