cast a C char array - offset ?
ketmar via Digitalmars-d-learn
digitalmars-d-learn at puremagic.com
Mon Feb 2 05:32:57 PST 2015
On Mon, 02 Feb 2015 13:23:23 +0000, irtcupc wrote:
> my current understanding is that:
> - C: char CompleteInstr[INSTRUCT_LENGTH] is actually a raw chunk - D:
> defining the member as char[INSTRUCT_LENGTH] is an error - the first
> member of a D array is the .length - first char actually stands where
> .length uses to be, which explains the shift.
nope. fixed length arrays doesn't have dedicated `.length` member. try
this:
align(1)
struct _Disasm {
align(1):
...
-------------- next part --------------
A non-text attachment was scrubbed...
Name: signature.asc
Type: application/pgp-signature
Size: 181 bytes
Desc: not available
URL: <http://lists.puremagic.com/pipermail/digitalmars-d-learn/attachments/20150202/86df0cd5/attachment.sig>
More information about the Digitalmars-d-learn
mailing list