GLProgramming.com

home :: about :: development guides :: irc :: forums :: search :: paste :: links :: contribute :: code dump

-> Click here to learn how to get live help <-


New Paste :: Recent Pastes:: Add Line Numbers


pointer to class by miptex
//----firstClass.h----

class thirdClass;

class firstClass
{
protected:
      thirdClassClass *classPointer;
};

//---thirdClass.h-----

class thirdClass
{
public:
         SDL_Surface *surface;
};

//---secondClass.h-------

class secondClass : public firstClass
{
public:
     void render();
};

//------secondClass.cpp----

void secondClass::render()
{
     //Do something with classPointer->surface.   
}