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.

error messages


Comments

Popular posts from this blog

angular - Ionic slides - dynamically add slides before and after -

minify - Minimizing css files -

Add a dynamic header in angular 2 http provider -