From: dave.hellewell@gmail.com (Dave Hellewell)
To: kernelnewbies@lists.kernelnewbies.org
Subject: Why use "." in the struct in this way?
Date: Tue, 30 Jul 2013 01:24:29 +1000 [thread overview]
Message-ID: <51F6892D.5030205@gmail.com> (raw)
In-Reply-To: <CA+5jrf=Nr7qEEiSwU416CkFtCwj6juiLsN-0-xTmn=8K5dPq4A@mail.gmail.com>
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
prev parent reply other threads:[~2013-07-29 15:24 UTC|newest]
Thread overview: 4+ messages / expand[flat|nested] mbox.gz Atom feed top
2013-07-29 14:56 Why use "." in the struct in this way? lx
2013-07-29 15:20 ` Prashant Shah
2013-07-29 15:22 ` Alexandru Juncu
2013-07-29 15:24 ` Dave Hellewell [this message]
Reply instructions:
You may reply publicly to this message via plain-text email
using any one of the following methods:
* Save the following mbox file, import it into your mail client,
and reply-to-all from there: mbox
Avoid top-posting and favor interleaved quoting:
https://en.wikipedia.org/wiki/Posting_style#Interleaved_style
* Reply using the --to, --cc, and --in-reply-to
switches of git-send-email(1):
git send-email \
--in-reply-to=51F6892D.5030205@gmail.com \
--to=dave.hellewell@gmail.com \
--cc=kernelnewbies@lists.kernelnewbies.org \
/path/to/YOUR_REPLY
https://kernel.org/pub/software/scm/git/docs/git-send-email.html
* If your mail client supports setting the In-Reply-To header
via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line
before the message body.
This is an external index of several public inboxes,
see mirroring instructions on how to clone and mirror
all data and code used by this external index.