0
Template member function
class A { public: template<class T> void foo(T c) { // Do stuff } } A* w; w->foo<NewStuff>(11); --- > not working w->template foo<NewStuff>(11); --- > not working any suggestion please??
3 odpowiedzi
+ 2
"w" is just a pointer which is supposed to point to an object of class A, but you never made it point to an object at first place.
A *w = new A;
Is what you are missing.
+ 1
It would be much better to provide us with a minimum reproducible example of this error.
0
No, I did that I forget to include it in the question.... sorry!