I work on a system that communicates with other systems via messages. Those messages are defined in a spec and every word must be exactly as defined. To accomplish this Ada allows me to define the fields of my record to specific words in memory. Will C++ allow me to accomplish this same task and if so could someone post an example
Code:
word = 4;
type Msg_Type1 is record
x: Some_Type;
y: Another_Type;
z: Another_Type;
end record;
// ada allows me to rep out my record using the 'for use' clause
for Msg_Type1 use record
x at 0*word range 0..31;
y at 1*word range 0..15;
z at 1*word range 16..31;
end record;