Virtual Functions How do virtual functions work in C++? Solutions: Virtual functions use a vtable and dynamic binding. C++ O(n) Installation Run make to build and run Swift files. Or you can run .playground file.