SookYoung Kim wrote:

> >> struct foo *p;

> Is it  different from
> memset(p,0,sizeof(*p))
> and
> memset(p,0,sizeof(struct foo)) ?

They are the same. The type of "*p" is "struct foo".

I prefer to write this way since it allows me to change
"struct foo *p" to "struct foo2 *p" without changing
every sizeof related to *p.

---
Henrik Nordstrom

Reply via email to