Quote:Original post by Agony
You'd end up with a problem anyway, even if you used a smart pointer that does work with containers (such as boost::shared_ptr).
Actually Boost's smart pointers are sufficiently smart that they could be used here. All you'd have to do is pass SDL_FreeSurface when constructing the pointer (boost::shared_ptr< SDL_Surface > shared_ptr(TTF_RenderText_Solid(FontText, setFontVar.c_str(), local_fg), SDL_FreeSurface);).
theSecondt: What exactly is going wrong and how are you diagnosing it? Going from an array to a vector should be trivial.
Σnigma