Category

Programming

C++ProgrammingTutorial

C++ Tutorial: Auto Registering Factory

Factories are an extremely useful design pattern in programming. If you do not know what the factory pattern is, it is simply a way for code to generate instances of objects by specifying a unique identifier. In this example, I have chosen to go with a text adventure visit to an eatery with the name of FoodFactory. The player can type in the name of an item they want to order, and the code will generate an instance of that object, call some class member functions, and destroy it. The player does not need to define what a taco is…
Derrick Canfield
March 5, 2019