Search:

Type: Posts; User: Aaron Jackson

Search: Search took 0.01 seconds.

  1. Doing the following fixed the issue: ...

    Doing the following fixed the issue:



    typedef struct InvoiceRow {
    uint INVOICE_NUMBER;
    ...
    double GROSS __attribute__((packed));

    ...
  2. I just read about this Data structure alignment -...

    I just read about this Data structure alignment - Wikipedia, the free encyclopedia ... I am assuming it is related?
  3. Hey. offsetof is a pretty useful tip, thanks. ...

    Hey. offsetof is a pretty useful tip, thanks.

    It has showed me that GROSS is type bytes off where I would have thought it would be. This is especially strange though because changing "double...
  4. The size is as expected, and writing the struct...

    The size is as expected, and writing the struct back out to a file results in exactly the same data as the file I read from. Kinda weird.

    The value which the double was being set to appeared to...
  5. Confused by accessing a double from this struct

    Hi all,

    I am parsing a binary data file by casting a buffer to a struct. It seems to work really well apart from this one double which is always being accessed two bytes off, despite being in the...
Results 1 to 5 of 5