Solution: Factory Method
Get a detailed explanation of the solutions to the factory methods exercises.
We'll cover the following
Solution to the first problem
Here is the refactored code using std::shared_ptr
.
Get hands-on with 1400+ tech skills courses.