Originally Posted by
CommonTater
I did not say they were the same...
"It pretty much all amounts to the same thing"
That is to say you end up with a struct and a pointer to the struct....
Very well, it looks like I have to take a direct approach: you're wrong. In this code snippet, aggregator is an alias for struct aggregator_t, and ags is a pointer to a struct of that type:
Code:
struct aggregator_t
{
int n;
int m;
};
typedef struct aggregator_t aggregator;
aggregator *ags;
But in this code snippet, aggregator is an alias for struct aggregator_t, and ags is an alias for struct aggregator_t*:
Code:
typedef struct aggregator_t
{
int n;
int m;
} aggregator, *ags;
Since ags in the former is not the same as ags in the latter, the code snippets do not amount to the same thing.