M
mrDumbass
The following 'minimal example' code works(to my knowledge) but it
envokes some strange behaviour of my computer, not fatal, but some
strange lag.
i have a feeling i did something wrong with a pointer or two.
Did i make an error in this code ?? or is it my imagination.
int ***neuralNetwork;
int width;
int hight;
int depth;
// making
neuralNetwork = new int **[width];
for (int i=0; i < width; i++)
{
neuralNetwork = new int *[hight];
for (int j=0; j < hight; j++)
neuralNetwork[j] = new int[depth];
}
// filling
for (int i = 0; i < depth; i++)
for (int k = 0; k < hight; k++)
for (int j = 0; j < width; j++)
neuralNetwork[j][k] = 0;
// deleting
for (int i=0; i < width; i++)
{
for (int j=0; j < hight; j++)
delete [] neuralNetwork[j];
delete [] neuralNetwork;
}
delete [] neuralNetwork;
envokes some strange behaviour of my computer, not fatal, but some
strange lag.
i have a feeling i did something wrong with a pointer or two.
Did i make an error in this code ?? or is it my imagination.
int ***neuralNetwork;
int width;
int hight;
int depth;
// making
neuralNetwork = new int **[width];
for (int i=0; i < width; i++)
{
neuralNetwork = new int *[hight];
for (int j=0; j < hight; j++)
neuralNetwork[j] = new int[depth];
}
// filling
for (int i = 0; i < depth; i++)
for (int k = 0; k < hight; k++)
for (int j = 0; j < width; j++)
neuralNetwork[j][k] = 0;
// deleting
for (int i=0; i < width; i++)
{
for (int j=0; j < hight; j++)
delete [] neuralNetwork[j];
delete [] neuralNetwork;
}
delete [] neuralNetwork;