// errors //dPaused.cpp In member function `int PausedDiv::Init()': //dPaused.cpp no match for 'operator=' in '((PausedDiv*)this)->PausedDiv::img = SDL_LoadBMP_RW(SDL_RWFromFile(((const char*)"images/paused.bmp"), ((const char*)"rb")), 1)' //note C:\Dev-Cpp\include\SDL\SDL_video.h:99 candidates are: SDL_Surface& SDL_Surface::operator=(const SDL_Surface&) // dPaused.cpp int PausedDiv::Init() { // Initialise the image this->img = SDL_LoadBMP("images/paused.bmp"); } // dPaused.h class PausedDiv: public SDL_Surface { private: bool paused; SDL_Surface img; public: bool Pause(); bool Unpause(); int Init(); void PausedDiv::Draw(SDL_Surface *screen); }; // main.cpp void DrawScene() { dPaused->Draw(screen); }