Path: utzoo!utgpu!news-server.csri.toronto.edu!cs.utexas.edu!sdd.hp.com!decwrl!ucbvax!bloom-beacon!eru!hagbard!sunic!spader!lab From: lab@spader.UUCP (Lars Berntzon) Newsgroups: comp.lang.c Subject: Initialization Keywords: Cross reference, initialization Message-ID: <464@spader.UUCP> Date: 3 Oct 90 19:30:15 GMT Organization: CGL Techno AB, Kista, Sweden Lines: 36 Hello! My problem is that i want to initialize two types of struct variables with the address of the opposit struct. What i want to do is: { struct a { struct b *b; variable . . }; struct b { struct a *a; other variables . . }; static a = {&b, data ...}; static b = {&a, other data...}; } I thought of declaring the two structs as extern, but i need (would like) to have them as static beccause in my application there arent just two structs but hundreds. Is there any similar way for static declarations as for extern declarations (ie. declaring, not defining static variables), or is there any other way to do this initialization ? Any suggestions how this could be done would be apprecciated. -------------------------------------------------------------------------------- Lars Berntzon UUCP: mcsun!sunic!spader!lab CGL Techno Danmarksg. 46 Sweden