c++ - Trouble passing pointer to class object as template function parameter -
i have template class, inputhandler, should take pointer either class pageone or pagetwo.
calling
pageone *pageone = new pageone; pagetwo *pagetwo = new pagetwo; inputhandler<pageone> handler; handler.setpage(*pageone);
inputhandler header
template <class t> class inputhandler { public: inputhandler(); void setpage(t page); t inpage; };
defs
template <class t> void inputhandler<t>::setpage(t page) { inpage = page; }
these errors i'm getting , seems syntactically correct i'm not sure what's happening. i'm running in qt if helps.
Comments
Post a Comment