Nov 22, 2008 at 8:32pm UTC
I dont see the meaning of the above code, however you could use a pointer to the array:
1 2 3 4 5 6 7 8 9 10
int myArray[10];
int * myPointer;
myPointer=myArray;
/*
*(myPointer)==myArray[0]
*(myPointer+1)==myArray[1]
etc..
*/
Last edited on Nov 22, 2008 at 8:33pm UTC
Nov 22, 2008 at 8:36pm UTC
Heh, yes i think i can say i'm to tired now.. heh i dont know how i didnt think of that. Cheers :D
Nov 22, 2008 at 9:22pm UTC
Um... myArray is already a pointer. The prototype would be
void MyFunction(SDL_Rect *pCamera, SDL_Rect *tile,int tiletype);
Nov 22, 2008 at 10:05pm UTC
I think this should work:
void MyFunction(SDL_Rect *pCamera, SDL_Rect tile[]);
If you want to get the number of elements, use sizeof (title)/sizeof (SDL_Rect)