Function call; fields of the object have junk value

In reply to Verif Engg:

Check here. Opcode of 'h2 is displayed as output after commenting pkt=new(). What are you really expecting?