Thanks for the effective and quick response.
It works,,,,,
Now i use
Qt Code:
  1. QDataStream &operator <<(QDataStream &out, const hShakeAckPkt &hand_shake_pkt)
  2. {
  3. out << hand_shake_pkt.Id;
  4. out << hand_shake_pkt.BlockSize;
  5.  
  6. for(int i = 0; i < 2; ++i)
  7. out << hand_shake_pkt.Reserved1[i];
  8.  
  9. out << hand_shake_pkt.FeedType;
  10.  
  11. for(int i = 0; i < 3; ++i)
  12. out << hand_shake_pkt.Reserved2[i];
  13.  
  14. out << hand_shake_pkt.Major;
  15. out << hand_shake_pkt.Minor;
  16.  
  17. for(int i = 0; i < 21; ++i)
  18. out << hand_shake_pkt.ProgramId[i];
  19.  
  20. return out;
  21. }
  22.  
  23. QDataStream &operator >>(QDataStream &in, hShakeAckPkt &hand_shake_pkt)
  24. {
  25. in >> hand_shake_pkt.Id;
  26. in >> hand_shake_pkt.BlockSize;
  27.  
  28. for(int i = 0; i < 2; ++i)
  29. in >> hand_shake_pkt.Reserved1[i];
  30.  
  31. in >> hand_shake_pkt.FeedType;
  32.  
  33. for(int i = 0; i < 3; ++i)
  34. in >> hand_shake_pkt.Reserved2[i];
  35.  
  36. in >> hand_shake_pkt.Major;
  37. in >> hand_shake_pkt.Minor;
  38.  
  39. for(int i = 0; i < 21; ++i)
  40. in >> hand_shake_pkt.ProgramId[i];
  41.  
  42. return in;
  43. }
To copy to clipboard, switch view to plain text mode