N
Nope
LO everybody,
I have a string (defined as a character array), and a structure which
comprises of unsigned chars, chars or char arrays. I want to copy the
'string' into the structure, in one action, using memcpy
Am I correct in assuming that I can't (or shouldn't) because of
structure padding? Lets say I've got a struct of
{
char a[6];
char b;
char c[3];
}
Could I expect a compiler to align 'b' to the next boundary?
PS my struct will only ever be made up of char types.
Thanks.
I have a string (defined as a character array), and a structure which
comprises of unsigned chars, chars or char arrays. I want to copy the
'string' into the structure, in one action, using memcpy
Am I correct in assuming that I can't (or shouldn't) because of
structure padding? Lets say I've got a struct of
{
char a[6];
char b;
char c[3];
}
Could I expect a compiler to align 'b' to the next boundary?
PS my struct will only ever be made up of char types.
Thanks.