Why use "." in the struct in this way?
Dave Hellewell
dave.hellewell at gmail.com
Mon Jul 29 11:24:29 EDT 2013
On 30/07/13 00:56, lx wrote:
> hi all:
> why use the struct in this way by "."
>
> for example, *.owner* instead of *owner* , why?
It's utilising a feature known as designated initialisers. Essentially,
using this technique, struct members may be initialised out of order
from the way the struct is defined.
cf.
http://en.wikipedia.org/wiki/Struct_(C_programming_language)#Struct_initialization
Cheers,
Dave
More information about the Kernelnewbies
mailing list