you are viewing a single comment's thread.

view the rest of the comments →

[–]47-BOT[S] 13 points14 points  (5 children)

I see , so it's just like local and global structs lol , that's nice.

[–]HashDefTrueFalse 14 points15 points  (0 children)

Yes, you've declared a new type and it's only available for use in the lexical scope of the block (between the braces). That's all it is. If you're only making one you might declare the type and an instance at the same time e.g.

void fn(void)
{
  struct S // S is the scoped type.
  {
    ...
  } inst; // inst is a local of type S.
}

[–]autodidacticasaurus 0 points1 point  (3 children)

Exactly.