From: Johan K. <ra...@cd...> - 2001-11-16 16:15:38
|
Replying to my own message here since I noticed an error. > > wrong external declaration. So it can be different to "_font_ring", > > what "font_ring" in C is. I thought, the > > > > extern struct font_head *font_ring[4]; > > > > would give > > > > 1. a pointer to > > 2. an array of four struct font_head entries. I think you meant to say 2. an array of four struct font_head pointers > font_ring > or > &font_ring > is indeed such a pointer. This is only true with my correction of your 2. above. By the way, note that there's never any point in specifying the number of elements for the outer array subscript when doing a declaration (that is not also a definition) in C. The compiler has no need for it and can do nothing with it. Obviously, you can not leave it out for inner subscripts of multi-dimensional arrays, though. That is extern int p[]; void r(int q[][7]) works just as well as extern int p[100]; void r(int q[100][7]) and the compiler couldn't use the 100 for anything. -- Chalmers University | Why are these | e-mail: ra...@cd... of Technology | .signatures | jo...@om... | so hard to do | WWW: rand.thn.htu.se Gothenburg, Sweden | well? | (fVDI, MGIFv5, QLem) |