the code that you see there works, but into function() ptr->i is not recognise from the compiler, in fact the compiler see "i" as unknown when i point it with ptr->i. And if i should need a string into the structure i couldn't use all the string function associated to it like size() because it is see as unknown.
On the other hand when i realise this code without templates all works correctly, so where am i wrong?
Thanks to all will give me some advice!
Side note: I'm working with visual studio 2019 with default compiler and c++11 version