i am so sorry. its working. may be that was a bad copy.i checked again. this time its working.
did you notice push_back() is taking a pointer p . but when i usued pointer p in my original code push_back() gave me an error. thats why i wrote //illegal.
what push_back() actually demands ? does it demand pointer and argument both . then i have to call it a overloaded function !!
its really a peculiar behaviour of push_back().....
i may be wrong somewhere.....