Archived

This topic is now archived and is closed to further replies.

How to dynamically create an SDL_Surface

This topic is 5502 days old which is more than the 365 day threshold we allow for new replies. Please post a new topic.

If you intended to correct an error in the post then please contact us.

Recommended Posts

Ok. As the topic says, I want to dynamically allocate an array of SDL_Surfaces. Something along these lines (this doesn''t work) SDL_Surface **poo; *poo = new SDL_Surface[10]; Thanks "Discipline is never an end itself, only a means to an end." - Robert Fripp

Share this post


Link to post
Share on other sites
Guest Anonymous Poster
SDL_Surface** srf;

srf = new SDL_Surface*[10];

if I remember correcly.

Share this post


Link to post
Share on other sites
Thanks, I''ll check to see if it works when I get home. The reason I want to do this is to allow different sprites to have a differing number of frames for animation.

"Discipline is never an end itself, only a means to an end." - Robert Fripp

Share this post


Link to post
Share on other sites