Name: Anonymous 2012-09-16 11:58
I'm trying to run a function which uses a 2d array as a parameter, and it's giving me shit most of the time.
Explicitly, I'm using Irrlicht's 2d graphicsdemo (#6), I create a 2d array of int *myarray[4][4];, my function is:
void initmyarray(int *thisarray[4][4])
{
int x, y = 0;
for(x=0;x < 5; ++x)
{for(y=0; y < 5;++y )
{
thisarray[x][y] = 0;
}
};
};
I run the declaration (or whatever) and function as initmyarray(myarray2); before the while(device->run() && driver) runs, and after driver->getMaterial2D().AntiAliasing=video::EAAM_FULL_BASIC; runs, and although I can finally get the program to compile, and it makes the animated imps blink after each loop. I tried renaming initarry and myarray obviously, but after trying to pass arguments and shit properly this happens. If I comment out initmyarray(myarray2); the imps animate properly.
Suggestions? I'll use vectors if I have to, I'm just trying to make a 2d grid with which I can do shit.
I'm running Code::Blocks with MingW, and the only build option is produce debugging symbols.
Explicitly, I'm using Irrlicht's 2d graphicsdemo (#6), I create a 2d array of int *myarray[4][4];, my function is:
void initmyarray(int *thisarray[4][4])
{
int x, y = 0;
for(x=0;x < 5; ++x)
{for(y=0; y < 5;++y )
{
thisarray[x][y] = 0;
}
};
};
I run the declaration (or whatever) and function as initmyarray(myarray2); before the while(device->run() && driver) runs, and after driver->getMaterial2D().AntiAliasing=video::EAAM_FULL_BASIC; runs, and although I can finally get the program to compile, and it makes the animated imps blink after each loop. I tried renaming initarry and myarray obviously, but after trying to pass arguments and shit properly this happens. If I comment out initmyarray(myarray2); the imps animate properly.
Suggestions? I'll use vectors if I have to, I'm just trying to make a 2d grid with which I can do shit.
I'm running Code::Blocks with MingW, and the only build option is produce debugging symbols.