memset(&sdl_rect_object, 0, sizeof(SDL_Rect));
char_frame.push_back(sdl_rect_object);
Might have to cast sdl_rect_object as a void * though.
Or you could:
sdl_rect_object.x = 0;
sdl_rect_object.y = 0;
sdl_rect_object.h = 0;
sdl_rect_object.w = 0;
char_frame.push_back(sdl_rect_object);
Last edited on
This also works
char_frame.push_back(SDL_Rect());