fork download
  1. #include <iostream>
  2.  
  3. struct overhead{
  4.  
  5. unsigned char flags;
  6. unsigned short int seqNo, timeDiff, threshold, length;
  7.  
  8. };
  9.  
  10. struct payload{
  11.  
  12. double forceX,forceY,forceZ,positionX,positionY,positionZ;
  13.  
  14. };
  15.  
  16.  
  17. struct packet{
  18.  
  19. overhead fields;
  20. payload data;
  21.  
  22. };
  23.  
  24.  
  25.  
  26. int main(int argc, char* argv[]) {
  27. std::cout << sizeof(packet) << std::endl;
  28.  
  29. return 0;
  30. }
Success #stdin #stdout 0s 2852KB
stdin
Standard input is empty
stdout
60