I am trying to allocate an array of two-dimensional dimensions of file descriptors ... So I need something like this FD [0] [0] FD [0] [1]
I have encoded so far:
void allocateMemory(int row, int col, int ***myPipes){
int i = 0,i2 = 0;
myPipes = (int**)malloc(row * sizeof(int*));
for(i = 0; i < row;i++){
myPipes[i] = (int*)malloc(col * sizeof(int));
}
}
How can I set everything to all zeros right now, I keep getting a seg error when I try to assign a value ...
thank
source
share