values assigning

Hi
What is this type of value assigning? And what is/are it's usage(s)?
.d_version = D_VERSION
Last edited on
nothing is clear from your assignment. A variable cannot start with a dot. Post more code.
Value assignment to struct fields:
1
2
3
4
5
6
7
8
9
static struct cdevsw echo_cdevsw =
{
	.d_version = D_VERSION,
	.d_open = echo_open,
	.d_close = echo_close,
	.d_read = echo_read,
	.d_write = echo_write,
	.d_name = "echo"
};

create an instance and assign values to fields.
These are C99 'Designated Initializers'
Not available in C++.
http://www.informit.com/guides/content.aspx?g=cplusplus&seqNum=550
Topic archived. No new replies allowed.