Quote Originally Posted by borisbn View Post
Qt Code:
  1. struct MyStruct {
  2. int x;
  3. int y;
  4. };
  5. MyStruct s;
  6. char buff[ sizeof( MyStruct ) ];
  7. memcpy( buf, &s, sizeof( MyStruct ) );
To copy to clipboard, switch view to plain text mode 
isn't it ?
hi borisbn,
Thanks for replying, i tried the way you told, but it's not working. Is there any way to copy the contents of a structure to an array(of any type)?