Original Post
well this is the situation:
I have two types of structs somat like this:
Edit: just to clarify; *b.arrayptr[0/1/2] should point to
a.array[0][0][0/1/2] respectivly
Could any1 help out ?
btw: Just wanna say big thanks to everyone here helping out solving problems, I've probably gotten help here on these boards over a hundred times. Keep up the good work
Edited by - Jesper T on October 11, 2001 2:32:08 PM
struct a_str {
double array[4][4][3];
};
struct b_str {
a_str *aptr;
double *arrayptr[3];
};
// Next I make two structs of those kinds like this:
a_str a;
b_str b;
b.aptr = &a
// And here is where the problem comes in:
// I want to make the *arrayptr point to the array in the struct
// that b.aptr points to, I tried various things, like this:
b.arrayptr[0] = &b.aptr->array[0][0][0];
// But it seems that it either makes a compile error, or it
// makes it crash (the one above makes the program crash).
// Note that it has to be pointed through the b.aptr,
// not directly to a.array
|