I have been at it for quite some hours now so I pretty desperate, please bear with me here :).
The addEntity function looks like this:
Entity& addEntity()
{
Entity* e = new Entity();
std::unique_ptr<Entity> uPtr{ e };
entities.emplace_back(std::move(uPtr));
return *e;
}
and this is how I create Entities:
auto& example(manager.addEntity());
My question is how do I create an array of entities using the addEntity() function.
I tried the following:
auto& example[100](manager.addEntity());
and I got multiple errors.
I usually don’t really post anything on here but I really can’t focus enough atm to interpret another solution of a slightly different problem as a solution for mine :).
Ragnar123 is a new contributor to this site. Take care in asking for clarification, commenting, and answering.
Check out our Code of Conduct.