Quote Originally Posted by mickey
now I don't know.
So maybe you should redesign your classes?

For example like this:
Qt Code:
  1. void DOOR::draw( const QImage& img )
  2. {
  3. // ...
  4. }
  5.  
  6. void build::draw()
  7. {
  8. // ...
  9. for( std::vector<DOOR>::iterator it = door.begin(); it != door.end(); ++it ) {
  10. it->draw( imm );
  11. }
  12. // ...
  13. }
To copy to clipboard, switch view to plain text mode 
Other possibility is that each of DOOR instances would hold a pointer or reference to a build instance:
Qt Code:
  1. void DOOR::draw()
  2. {
  3. // ...
  4. QImage img( _build->image() );
  5. // ...
  6. }
  7.  
  8. const QImage& build::image() const
  9. {
  10. return _imm;
  11. }
To copy to clipboard, switch view to plain text mode 
Everything depends on the way you want to use those two classes and on things what they represent.