• Advertisement


This topic is now archived and is closed to further replies.

segmentation fault using new /w template?

This topic is 5151 days old which is more than the 365 day threshold we allow for new replies. Please post a new topic.

If you intended to correct an error in the post then please contact us.

Recommended Posts

here is my template im using: i extend from RegBase as i need to keep a list of ObjReg's... i also tried not making RegBase's Create not abstract, but it still causes a segmentaation fault :-/ class RegBase { public: virtual Obj* Create() = 0; }; template class ObjReg : public RegBase { public: ObjReg( std::string classId ) { ObjMgr::Register( classId, (RegBase*)this ); } Obj* Create() { return (new T); //return 0; } protected: }; *edit ops... the segemntation fault occus when i call Create() [edited by - supagu on February 8, 2004 5:38:03 AM]

Share this post

Link to post
Share on other sites

  • Advertisement