int main()
{ bool **ptr_array;
int num;
int *array_size;
cin>>num;
ptr_array = newbool*[num];
array_size = newint[num];
Setup(ptr_array, array_size, num);
return 0;
}
void Setup(bool *ptr_array[], int array_size[], int num)
{ int i;
for (i=0; i<num; i++)
Initialize(ptr_array[i], array_size[i]);
}
void Initialize(bool word[], int num)
{ int i;
for (i=0; i<num; i++)
word[i] = false;
}
Once the program reaches the word[num] = false; some unhandled exceptions pop up. Any clarification you guys can give me on these techniques will be greatly appreciated!
edit - My mistake, I simplified my code a bit from my actual program and mixed up the loops, now the code should be in its correct form.