SDL_Rect and 2 dimensional arrays.

Hello guy , i am trying to create w breakout clone using SDL 2 C++. the thing is i got the paddle moving and got the ball bouncing around the screen.
Note that i have used SDL_Rect for the paddle and the ball moreover , i want also to draw the bricks using 2 dimensional arrays of SDL_Rect , but i am very confused about how to do this and render to the screen . is there anyone who can help? by giving me examples on how to use SDL_Rect with 2d arrays or Vectors for that matter?

Thanks
Why does it have to be a 2D array? Just use a vector and draw each element.
1
2
for (auto &rect : rects)
    SDL_FillRect(/*etc*/);
Topic archived. No new replies allowed.