私はこの機能を持つクラスを持っています:
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);
}
}
コンパイラは、クラスboost :: shared_ptrには「RenderShape」というメンバーがないことを教えてくれます。これは、クラスPrimShapeBaseが確かにその機能を持っていますが、別のヘッダーファイルにあるためです。これの原因は何ですか?