-1

I don't know how to title this because I'm stumped. I am looking at some C code that looks like this:

struct my_struct const mystruct = {
.data = &my_data;
}

What is this . notation? Can someone explain to me? Give some better examples? I searched up and down my C notes and books, I see no reference to this. Is this some throwback from Assembly language mixed into C?

Thanks!

ChumbiChubaGo
  • 968
  • 2
  • 9
  • 15

1 Answers1

1

It is called Designated Initializer. It added to C in C99 standard. You can learn more about it at the link.

Honza Dejdar
  • 947
  • 7
  • 19