Don't like ads? PRO users don't see any ads ;-)
Guest

Untitled

By: a guest on Apr 29th, 2012  |  syntax: None  |  size: 0.21 KB  |  hits: 13  |  expires: Never
download  |  raw  |  embed  |  report abuse  |  print
Text below is selected. Please press Ctrl+C to copy to your clipboard. (⌘+C on Mac)
  1. Is there any downside to declaring a struct containing a single array as packed?
  2. class foo {
  3. public:
  4.     // methods
  5. private:
  6.     int myarray[10];
  7. };
  8.        
  9. struct __attribute__((__packed__)) bar {
  10.     foo x;
  11. };