unfamiliar syntax

How is it that the leading dot on the element names is valid? (This is from a Linux device driver.)

1
2
3
4
5
6
7
static struct file_operations fops =
{
   .open = dev_open,
   .read = dev_read,
   .write = dev_write,
   .release = dev_release,
};
Last edited on
It's part of C99. C++ does not support this syntax, to my knowledge.

http://en.cppreference.com/w/c/language/struct_initialization
Ah...very good. Thanks, helios.
Topic archived. No new replies allowed.