C ++ Iterowanie poprzez wektor inteligentnych wskaźników

mam klasę, która ma tę funkcję:

typedef boost::shared_ptr<PrimShapeBase> sp_PrimShapeBase; 



class Control{
     public:
         //other functions
         RenderVectors(SDL_Surface*destination, sp_PrimShapeBase);
     private:
         //other vars
          vector<sp_PrimShapeBase> LineVector;

};

//the problem of the program

void Control::RenderVectors(SDL_Surface*destination, sp_PrimShapeBase){
    vector<sp_PrimShapeBase>::iterator i;

    //iterate through the vector
    for(i = LineVector.begin(); i != LineVector.end(); i ++ ){
      //access a certain function of the class PrimShapeBase through the smart
      //pointers
      (i)->RenderShape(destination); 

    }
}

Kompilator mówi mi, że klasa boost :: shared_ptr nie ma żadnego członka o nazwie 'RenderShape', który znajduję dziwny, ponieważ klasa PrimShapeBase z pewnością ma tę funkcję, ale znajduje się w innym pliku nagłówkowym. Jaka jest tego przyczyna?

questionAnswers(2)

yourAnswerToTheQuestion