Simple struct/union/etc syntax question
This is probably a stupid question, but here goes. I've noticed in people's code that sometimes when they declare unions or structs, there is the string 'tag' as part of the name. I've always wondered, what does this mean, and what does it do? I've just never been introduced to this particular syntax. I always just use
Quote:
typedef struct
{
int a;
char b;
double c;
} structName;
Am I missing something by using this syntax?
Edit: While I'm at it, I've got another stupid question. I know with the old-style forums, you could use [ccode] [/ccode] to format C/C++ code to be readable. Is there any comparable feature with the new forum software?
Re: Simple struct/union/etc syntax question
Howdy Bob!
Does the code below answer your question?
Code:
typedef struct _Node
{
// ...
_Node* d;
} Node;
If not, please give an example.
Regards,