Hi Guys,

Thanks so much for your reply. This fixes my problem like Adam D.
Ruppe suggested:

int maxNeurons = 100;
Neuron[] neurons = new Neuron[](maxNeurons);

Neuron n;

for(int i = 0; i < maxNeurons; i++)
{
        n = new Neuron();
        neurons[] = n;
}

But can you give me a more details so I can understand what is
going on. What is the difference between

Neuron[] neurons = new Neuron[](maxNeurons);

and

Neuron*[] neurons = new Neuron*[](maxNeurons);


As I understand Neuron*[] should create array which elements are
pointers?


Is it possible to instantiate 100 objects in a for loop and get a
address of each object instance and store it in array of pointers?



Thanks

Reply via email to