Talk About Network

Google


Register and Login
Nick
Password
Register create new account Sign up is FREE and you can post replies, new topics, bookmark posts and more!
Recover lost password


Programming > C > struct declarat...
Latest [ Topics | Posts ] Archive Post A New Topic Post a Reply
<< Topic < Post Post 1 of 6 Topic 24768 of 27695
Post > Topic >>

struct declaration (silly question)

by Marcin Kasprzak <no@[EMAIL PROTECTED] > Mar 3, 2008 at 01:12 AM

Hello Guys,
Silly question - what is the most elegant way of compiling a code similar
to this one?

<code>
typedef struct a {
  b_t *b;
} a_t;

typedef struct b {
  a_t *a;
} b_t;

int main(void) {

  return 0;
}
</code>

my solution is to simply change type "b_t" to "void" but I'm not sure
if that's the best way of dealing with this issue.

Thanks,

-- 
Marcin Kasprzak
 




 6 Posts in Topic:
struct declaration (silly question)
Marcin Kasprzak <no@[E  2008-03-03 01:12:20 
Re: struct declaration (silly question)
Peter Nilsson <airia@[  2008-03-02 17:38:54 
Re: struct declaration (silly question)
Ben Pfaff <blp@[EMAIL   2008-03-02 17:38:20 
Re: struct declaration (silly question)
William Pursell <bill.  2008-03-02 20:51:00 
Re: struct declaration (silly question)
William Pursell <bill.  2008-03-02 20:54:55 
Re: struct declaration (silly question)
Marcin Kasprzak <no@[E  2008-03-03 09:50:50 

Post A Reply:
  Go here to Signup

AddThis Feed Button


About - Advertising - Contact - Frequently Asked Questions - Privacy Policy - Terms of Use - Signup

Contact
tan12V112 Tue Oct 14 11:33:15 CDT 2008.