Sdl_surface array

I’m trying to store sdl_surfaces in an array, but somehow it seems that
I can’t access the array to blit the surfaces.
At the moment I can blit only the first surface ([0][0]), is the some
special magic to access the other elements of the array? Maybe you can
give me a hint.

I declare the array inside a class and use it somewhere else, can this work?

|class core{
|| SDL_Surface *MapTextures[16][16];|
int drawScene(){|
for(int x=15;x>=0;–x){
for(int y=15;y>=0;–y){
printf("\n %i %i",x,y);
printf(" collision");
if(Video.drawTile(*MapTextures[x][y], MapTiles[x][y], ScreenRect)!=0){
return 1;
return 1;
return 0;

And the blitting function is this:

|class video{|
|int drawTile(SDL_Surface Tile, SDL_Rect Rect, SDL_Rect ScreenRect){
if(SDL_BlitSurface(&Tile, &Rect, Screen, &ScreenRect)!=0){
printf("\nerror while blitting surface %s",SDL_GetError());
return 1;
return 0;

I don’t want to generate to much traffic so I uploaded the rest of the
code, see

I hope you can give me a tip what I’ve done wrong.