Yes, if you have the library of programs contained in "Numerical Recipes in C" available...

I believe the syntax was ran4(-longint)

I believe the syntax was ran4(-longint)

.
void allocateMatrix(int ***pMatrix, int size)
{
int i, j;
*pMatrix = (int **) calloc (size, sizeof(int));
**pMatrix = (int *) calloc (size * size, sizeof(int));
for (i = 0, j = 0; i < size; i++, j += size) /* init array indices */
{
*(*pMatrix + i) = (**pMatrix + j);
}
}
int main()
{
int **pMatrix;
allocateMatrix(&pMatrix,100);
return 0;
}
.
Comment