diff options
Diffstat (limited to 'examples/basic/src/basic_example.cpp')
-rw-r--r-- | examples/basic/src/basic_example.cpp | 4 |
1 files changed, 3 insertions, 1 deletions
diff --git a/examples/basic/src/basic_example.cpp b/examples/basic/src/basic_example.cpp index f85ed2d..6f3e15c 100644 --- a/examples/basic/src/basic_example.cpp +++ b/examples/basic/src/basic_example.cpp @@ -12,7 +12,9 @@ int main() std::cout << "Created a hero\n"; - auto enemy = container.get<IEnemy>(); + auto enemy_factory = container.get<IEnemyFactory>(); + + auto enemy = enemy_factory(); std::cout << "Created a enemy with " << enemy->get_health() << " in health\n"; |