Return Styles: Pseud0ch, Terminal, Valhalla, NES, Geocities, Blue Moon.

Pages: 1-

help

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.

Name: niggertits 2014-02-14 10:38

language is c btw

Name: niggertits 2014-02-14 10:44

I'm trying to populate it with 0's because for some reason, it's default initialized to a bunch of random-ass integers.

It's the glitchiest ass array I've ever seen and I have no idea how to make it behave.

Name: Anonymous 2014-02-14 11:10

[code][/code]tags do exist for a reason,you know.

Name: niggertits 2014-02-14 11:59


Don't change these.
Name: Email:
Entire Thread Thread List