Now, I have to create a copy and an asign constructor,
My problem is, How I can do to do these [source lang="cpp"] MISC_Bouton (MISC_Bouton const& other)MISC_Bouton& MISC_Bouton ::operator=(MISC_Bouton const& other)[/source])
I already had that kind of problem with SDL_Surface* in my windows class but there are a function to copy SDL_Surface (SDL_ConvertSurface()) so I was abled to copy the SDL_Surface in himself and not the adress.
So anyone knows something to copy a TTF_Surface and not the adress ?
I think you should not copy them, but have a kind of resource manager. The resource manager will be responsible for the creation and destruction of the resources like this font. As a font can be shared between different objects, you won't use unnecessary memory to keep a copy for every objects using it. The resources should be ref counted, every object using them increasing the ref count and when the object is destroyed, the ref count is decreased. When the ref count reaches 0, the resource manager will destroy the resource.
It's ok, I have created a class Font, with the name and the font size in attribut, plus a function Get that return the TFF_Font*, so I won't have to create a TFF_Font* variable anymore.
I replace Char* by a string.