Can anyone tell me where the error is here? I get a Segmentation Fault error upon running the code (it compiles fine). Cheers.
The variable "size" and the constants are all initialised/defined properly.
Code:int array[MAX_HOUR - MIN_HOUR + 1][MAX_MINUTE - MIN_MINUTE + 1][size];
for (i = 0; i <= MAX_HOUR - MIN_HOUR; i++) {
for (j = 0; j <= MAX_MINUTE - MIN_MINUTE; j++) {
for (k = 0; k < size; k++) {
array[i][j][k] = 0;
}
}
}