Mail Archives: djgpp/1998/12/23/13:22:16
for one thing, rewrite that as
structtype structs[100].
Second, do you want to be able to use the pointer for something???????
If so, declare it normally, and use an ampersand "&" before it, which
means you get a pointer to where the data is located. I don't think that
you wanted to declare it as a pointer array, nor a pointer to the array.
Probably you should declare a pointer variable with typeof[member], and
assign the &structs[i].member to the pointer variable.
Hope this helps.
Toni Rasanen wrote:
> Oh, C fundamentals...
>
> I have a struct defined. It worked fine while I kept in in data;
> struct structtype structs[100];
> However, when I modified them to be pointers, compiler no longer
> finds members of structure;
> struct structtype *structs[100];
> ...
> *structs[i].member = ...
>
> What's the proper way to access that struct? I have tried everything
> I can think of, but without any success...
>
> Also, I tried to recompile binutils' OBJCOPY, but without success.
> It seems that I need something else too to compile (or even configure)
> it, in addition of normal djgpp binaries. WHAT do I need?
>
> /// Toni Räsänen
> /// torasane AT mail DOT student DOT oulu DOT fi
> \\\ Physicians ask how. Filosofians ask why. Dragons don't care.
- Raw text -