Name: niggertits 2014-02-14 10:36
Hey /prog/, I've got a problem and it's driving me fucking insane.
int minHeap[(int) pow((double) 2,limit)];
int popl;
printf("\n%d", sizeof(minHeap)); //outputs 4096, correct
for(popl = 0; popl < sizeof(minHeap); popl++)
{
printf("\n%d", popl);
minHeap[popl] = 0;
}
This always crashes at count 1041, and I can't figure out why the hell it's doing this.
int minHeap[(int) pow((double) 2,limit)];
int popl;
printf("\n%d", sizeof(minHeap)); //outputs 4096, correct
for(popl = 0; popl < sizeof(minHeap); popl++)
{
printf("\n%d", popl);
minHeap[popl] = 0;
}
This always crashes at count 1041, and I can't figure out why the hell it's doing this.