On Fri, 30 Nov 2007 02:53:53 -0500, Neil <Ne*******@worldnet.att.net>
wrote:
snip
>Yes it works. The structures are elaborate ( Not mine ) but they do
want the are supposed to. Same the adapter, and the battery from the
linked list.
The structs ( minus the uneeded stuff)are
Unfortunately, also minus some needed stuff.
>
struct adaptorBatteryData
{
struct batteryData const *battery;
};
struct adaptorData
{
struct adaptorBatteryData const *batData;
};
struct batteryData
{
};
struct adaptorBatteryData const *batPointer;
adaptors[position].batteries[channel] =
You have not told us what type of struct the object adaptors is a
pointer to or an array of. The underlying structure apparently has a
member named batteries which does not match any of the three
structures you listed.
>adaptors[position].adaptor[channel].batData->battery;
It apparently also has a member named adaptor which also doesn't match
any of the three structures you listed. But adaptor appears to be an
array of or a pointer to struct adaptorData since it has a member
named batData.
batData is a pointer to struct adaptorBatteryData which does have a
member named battery. This member is a pointer to struct
batteryData.
So the first question: Is the undefined member batteries an object of
a suitable type so batteries[i] can receive a value of type pointer to
struct batteryData?
>Gives the error "structure required on left side of . or *."
C doesn't have an operator "*.". It does have two operators "*" but
neither one is applied to structures.
So the second question: What is the correct text of the error message?
Use cut and paste; don't retype.
And the third question: Which of the objects adaptors[i]. or
adaptor[i] is not a structure?
Remove del for email