Original Post
Hi all I've an annoying issue here. My program runs fine when launched from within vis using either debug or release. outside of vis it hangs. when i use "attach to process" and select the program it's giving me an access violation whenever i try to allocate memory by the looks of it. the line it stops at right now is
Cloud* temp;
for (int i=0;i<(MAXCLOUDS-num);i++)
{
if (rand()%CLOUDPROB == 1)
//generate new cloud
{
>>DIES BECAUSE OF THIS 'NEW'>> temp=new Cloud;
temp->pos[y]=700;
temp->pos[x]=rand()%800;
temp->spriteID=rand()%16;
temp->velocity=1+(rand()%6);
clouds.push_back(temp);
}
}
}
after a few google searches i've downloaded winDbg but it's not very useful at all, shouting at me for possible exceptions from 3rd party apis long before it gets to the above function and doesn't let me skip past it, but then i've never used it before and might be doing it all wrong Corrupt heap seems to be a phrase cropping up a few times on google but other than that i'm pretty lost! Does anyone have any ideas about this? (before anyone points out, i know how crappy the random number generator is there but it serves its purpose for what i need in that function ;)