/** * testprototype.cpp */ #include "prototype.h" void main() { /** * Instantiate the baseline prototype and the client. */ Prototype* prototype = new ConcretePrototype1(); Client* client = new Client(); /** * Give the prototype to the client, and call * the method on the client to produce another * prototype. */ client -> setPrototype( prototype ); client -> operation(); /** * Clean-up. */ delete client; delete prototype; }