1. [OT] quick C struct void question

Just showing my ignorance. Obviously something like:

  typedef struct { 
                   void *p; 
  } P; 
is fine (it is, isn't it? getlost ). I just quickly want to know what happens if you delete the *. It it illegal? Is it treated as a byte?

Pete

new topic     » topic index » view message » categorize

2. Re: [OT] quick C struct void question

petelomax said...

Just showing my ignorance. Obviously something like:

  typedef struct { 
                   void *p; 
  } P; 
is fine (it is, isn't it? getlost ).

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 
 

new topic     » goto parent     » topic index » view message » categorize

3. Re: [OT] quick C struct void question

jimcbrown said...

It's illegal.

Thanks

new topic     » goto parent     » topic index » view message » categorize

Search



Quick Links

User menu

Not signed in.

Misc Menu