/** * testfactorymethod.cpp */ #include "factorymethod.h" void main() { /** * Instantiate a Creator object. */ Creator* creator = new ConcreteCreator(); /** * Call the operation which uses a factory method. */ creator -> anOperation(); /** * Clean-up. */ delete creator; };