firstly if i'm using node to store userDefinedData1, userDefinedData2, userDefinedData3 and i don know now which of them this pointer refering to so i can't make the cast..
secondly it gives me an error on a statement like this
node<userDefinedData>* k=dynamic_cast<node<userDefindData>*>(ptr);