   SDL game problem
  I got a problem with a SDL game. in the game i have a fight loop that ends with update function to update the health omy character on my screen, but instead of replacing the old one with a new one it owerwrites the old one so both are visible. and i have really tried everything like using:SDL_FreeSurface(my main screen);andhealth = TTF_RenderText_Solid(font, HP.c_str(), textColor);and after that updating the screen with SDL_Flip,but nothing seems to work maybe you have some ideas.   
  The normal way of clearing the screen is "SDL_FillRect(screen, 0, 0)". The second argument is a pointer to a SDL_Rect, which allows you to specify a sub-rectange to clear. The third argument is the colour, black is zero. Other colours can be generated by using SDL_MapRGB(screen->surface, r, g, b). You would usually call SDL_FillRect() before drawing anything else.You should never call SDL_FreeSurface() on the surface returned by SDL_SetVideoMode(), that is a special surface that is freed by SDL_Quit() or SDL_QuitSubSystem(SDL_INIT_VIDEO);.   