I have a storage array and I able to use push method. But, in another part of my code, I have a memory array and I can't do that. What's the reason? Doesn't exist push method in memory arrays?
Individual[] memory newPop = new Individual[](popSize);
for(uint i = 0; i < popSize; i++){
uint index1;
uint index2;
(index1, index2) = getIndex();
Individual newIndiv = crossover(index1, index2);
newPop.push(newIndiv);
}
And the error: