Mail Archives: djgpp/1997/05/21/04:32:10
This is slightly off topic but please help.
I want to do something like this:
a->b[i].d[j] = &(a->c[k]); /* the &() is wrong, I get a sigsev fault */
where "d" is an array of pointers
and "c" is an aray of integers
How do I make d[j] point to the address of b[k]?
Please don't recommend I abolish "a", although that does make the assignment
operation simpler (I've done it before, it's b[i].d[j] = &c[k]).
The nested properties of this structure are required for my program as it
makes the rest of the program simpler, though longer :-)
Thank you for your time,
--
+----------------------------------------+
| David Orme \/\ |
| phreadd AT powerup DOT com DOT au /\/ |
| powerup.com.au/~phreadd |
+----------------------------------------+
| "Striving for Excellence" |
+----------------------------------------+
- Raw text -