C structs NxN intersection -


this question has answer here:

i have script

a.h     #include b.h      typedef struct b b; typedef struct a; struct a{      val1;    b   val2; } 

b.h     #include a.h      typedef struct b b; typedef struct a; struct b{      val1;    b   val2; } 

how can make work?
can create val1 , give him val1.val2=xx val1.val2.val1=xx or val2.val1=xx isn't working.

you're trying create struct contains copy of itself. can't work. can create pointer itself:

typedef struct b b; typedef struct a; struct b{      *val1;    b   *val2; }; 

Comments

Popular posts from this blog

resizing Telegram inline keyboard -

command line - How can a Python program background itself? -

php - "cURL error 28: Resolving timed out" on Wordpress on Azure App Service on Linux -