1. [OT] quick C struct void question
- Posted by petelomax Aug 29, 2015
- 1611 views
Just showing my ignorance. Obviously something like:
typedef struct {
void *p;
} P;
is fine (it is, isn't it?
). I just quickly want to know what happens if you delete the *. It it illegal? Is it treated as a byte?
Pete
2. Re: [OT] quick C struct void question
- Posted by jimcbrown (admin) Aug 29, 2015
- 1595 views
petelomax said...
Just showing my ignorance. Obviously something like:
typedef struct {
void *p;
} P;
is fine (it is, isn't it?
).
Yes.
petelomax said...
I just quickly want to know what happens if you delete the *. It it illegal? Is it treated as a byte?
Pete
It's illegal.
pete.c:2: error: variable or field 'p' declared void
3. Re: [OT] quick C struct void question
- Posted by petelomax Aug 29, 2015
- 1585 views
jimcbrown said...
It's illegal.
Thanks

