From 376ef270b255256b4154eafaea3530ab01e7ccc5 Mon Sep 17 00:00:00 2001 From: HampusM Date: Fri, 29 Apr 2022 20:51:15 +0200 Subject: docs: add factory to basic example --- examples/basic/src/basic_example.cpp | 4 +++- 1 file changed, 3 insertions(+), 1 deletion(-) (limited to 'examples/basic/src/basic_example.cpp') 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(); + auto enemy_factory = container.get(); + + auto enemy = enemy_factory(); std::cout << "Created a enemy with " << enemy->get_health() << " in health\n"; -- cgit v1.2.3-18-g5258