![]() | |
![]() |
| | Thread Tools | Display Modes |
#1
| |||
| |||
|
#2
| |||
| |||
|
|
class Edge{ unsigned int id; unsigned short tag; } |
#3
| |||
| |||
|
|
Hi Joe, class Edge{ unsigned int id; unsigned short tag; } It is likely (depending on your compiler settings) that sizeof (Edge) == 8. That is because the compiler will pad structures to some alignment. Those padding bytes probably explain what you are seeing here -- there are some random bytes that you don't see in the fields. If this is the explanation, you will need to zero all bytes before setting the fields in the objects (before storing or looking them up). Regards, Michael. |
![]() |
| Thread Tools | |
| Display Modes | |
| |