hey guys i got one more question :O
i have this code for a class function
void Platform::set_clips(SDL_Rect platClip[], int i)
{
for( int j = 0; j < i; j++ )
{
platClip[j].x = 0;
platClip[j].y = 0;
platClip[j].w = random_number_w();
platClip[j].h = 5;
}
}
is this legal?! i mean in the parameters of the function i just put SDL_Rect platClip[]
and when i actually call the function i will be putting SDL_Rect levelOnePlatform[50]
will this work? it doesnt compile if i dont put the [] int the function definition parameter.
Thanks a bunch :D